This is the ThingsDB documentation for version v0, click here for the latest version!

name

Returns the name of the enumerator member.

This function does not generate an event.

Function

member.name()

Arguments

None

Return value

Returns the name of the enumerator member.

Example

This code creates a closure with a doc string:

set_enum("Color", {
    RED: '#f00'
});

// Return the name of Color{RED}
Color{RED}.name();

Return value in JSON format

"RED"