This is the ThingsDB documentation for version v0, click here for the latest version!
Returns the value of the enumerator member.
This function does not generate an event.
member.value()
None
Returns the name of the enumerator member.
This code creates a closure with a doc string:
set_enum("Color", {
RED: '#f00'
});
val = Color{RED}.value();
assert( is_str( val ) ); // the value is of type `str`
val.upper(); // Return the value upper case
Return value in JSON format
"#F00"