@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

kismet/functions.ts:14open in new window

Methods

firstLine

Static firstLine(name, Class): string

Format the first line of the kismet item

Parameters

NameTypeDescription
namestringThe name of the item, ends with the sequence number
ClassstringThe class of the item, specified in the archetype of the item

Returns

string

Defined in

kismet/functions.ts:21open in new window


format

Static format(name, Class, variables): string

Format the whole kismet item

Parameters

NameTypeDescription
namestring
Classstring
variables(string | [string, KismetFormatterInput])[]The formatted

Returns

string

Defined in

kismet/functions.ts:59open in new window


lastLine

Static lastLine(): string

Format the last line of the kismet item

Returns

string

Defined in

kismet/functions.ts:28open in new window


variable

Static variable<Defined>(name, value): Defined extends true ? string : undefined | string

Format a variable in the kismet item

Type parameters

NameType
Definedextends boolean = false

Parameters

NameType
namestring
valueKismetFormatterInput

Returns

Defined extends true ? string : undefined | string

The variable in the format: {name}={value}

Defined in

kismet/functions.ts:38open in new window