Skip to content

Value Functions

Rohansi edited this page Dec 22, 2014 · 3 revisions

All values have the following functions defined.

getType

getType(): string

Returns the value's type as a string.

toString

toString(): string

Converts the value to a string. Will use the __string metamethod if available.

serialize

serialize(): string

Serializes the value to a JSON-like string. Will use the __serialize metamethod if available.

getPrototype

getPrototype(): any

Returns the prototype for the value.