type

Find the data type of the argument

Definition

string type(any $data)

Returns the data type of the argument.

Parameters

any $data

Data to find the data type of.

Returns

string

String representation of the data type.

Examples

{
  a: type(`null`),
  b: type(`1`),
  c: type('text'),
  d: type(`{name: 'Jane'}`),
  f: type(`[1, 2, 3]`),
  g: type(`true`),
  h: type(current_time(`0`))
}
{
  "a": "null",
  "b": "number",
  "c": "string",
  "d": "object",
  "f": "array",
  "g": "boolean",
  "h": "string"
}