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

type

Returns the type name of a value.

This function does not generate an event.

Function

type(value)

Arguments

Argument Type Description
value any (required) The value to return the type name for.

Return value

Type name of the given value.

Example

Returns the type name of a given value:

[
    type( nil ),
    type( 42 ),
    type( 3.14 ),
];

Example return value in JSON format

[
    "nil",
    "int",
    "float"
]