Table of contents
  1. 1. Usage Restrictions
  2. 2. Samples

Returns the type of the operand as a string.  The return value is one of "nil", "bool", "num", "str", "map", "list", "uri", or "xml".

Usage Restrictions

1.8.3 or later.

Samples


Output

To retrieve the type of a number:

{{ typeof 123 }}

num

To check if a value is a list:

{{ typeof [ 1, 2, 3 ] == "list" }}

true

To check if two values have the same type:

{{ typeof [ 1, 2, 3 ] == typeof nil }}

false

Tag page (Edit tags)
    You must login to post a comment.