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

is_thing

This function determines whether the provided value is a thing or not.

Type instances are also things, so this function returns true for a Type instance as well.

This function does not generate an event.

Function

is_thing(value)

Arguments

Argument Type Description
value any (required) The value to be tested.

Return value

Returns true if the given value is a thing, else it returns false.

Example

This code shows some return values for is_thing():

new_type('A');
[
    is_thing( {} ),
    is_thing( A{} ),
    is_thing( [] ),
];

Return value in JSON format

[
    true,
    true,
    false
]