@kismet.ts/shared / Exports / KismetItemFormatter
Class: KismetItemFormatter
Util class for formatting a kismet item
Table of contents
Constructors
Properties
Methods
Constructors
constructor
• new KismetItemFormatter()
Properties
joinCharacter
▪ Static joinCharacter: string = '\n'
The character to use for joining the variables when formatting
Default
\n
Defined in
Methods
firstLine
▸ Static firstLine(name, Class): string
Format the first line of the kismet item
Parameters
| Name | Type | Description |
|---|---|---|
name | string | The name of the item, ends with the sequence number |
Class | string | The class of the item, specified in the archetype of the item |
Returns
string
Defined in
format
▸ Static format(name, Class, variables): string
Format the whole kismet item
Parameters
| Name | Type | Description |
|---|---|---|
name | string | |
Class | string | |
variables | (string | [string, KismetFormatterInput])[] | The formatted |
Returns
string
Defined in
lastLine
▸ Static lastLine(): string
Format the last line of the kismet item
Returns
string
Defined in
variable
▸ Static variable<Defined>(name, value): Defined extends true ? string : undefined | string
Format a variable in the kismet item
Type parameters
| Name | Type |
|---|---|
Defined | extends boolean = false |
Parameters
| Name | Type |
|---|---|
name | string |
value | KismetFormatterInput |
Returns
Defined extends true ? string : undefined | string
The variable in the format: {name}={value}