Identity Operators
Last updated
Was this helpful?
{{$isNull value}}
Evaluates to true if value is null.
Arguments
value
A static value or a variable path
Returns
(Boolean)
Example
{{#if ($isNull category) }}Category is null{{/if}}
{
"category": null
}Category is null
{{$isNotNull value}}
Evaluates to true if value is not null.
Arguments
value
A static value or a variable path
Returns
(Boolean)
Example
{{#if ($isNotNull category) }}Category is not null{{/if}}
Category is
{{$isNil value}}
Evaluates to true if value is null or undefined .
Arguments
value
A static value or a variable path
Returns
(Boolean)
Example
{{#if ($isNil category) }}Category is nil{{/if}}
Category is nil
{{$isNotNil value}}
Evaluates to true if value is not null or undefined.
Arguments
value
A static value or a variable path
Returns
(Boolean)
Example
{{#if ($isNotNil category) }}Category is not nil{{/if}}
Category is not nil
{{$isEmpty path}}
Evaluates to true if the value of the variable path is undefined, null , an empty string ('') , empty object ({}), or an empty array ([]).
Arguments
path
A path to a variable to check for a value
Returns
(Boolean)
Example
{{#if ($isEmpty category )}}Category is empty{{/if}}
Category is empty
{{$isNotEmpty value}}
Evaluates to true if value is not undefined, null, an empty string (''), an empty object ({}), and not an empty array ([]).
Arguments
path
A path to a variable to check for a value
Returns
(Boolean)
Example
{{#if ($isNotEmpty category) }}Category is not empty{{/if}}
Category is not empty
Last updated
Was this helpful?
Was this helpful?
{
"category": "sports"
}{
"category":null
}{
"category":"sports"
}{
"name":"soccer"
}{
"category":"sports"
}