Handlebar Helper Function: Not
Performs a logical NOT operation on a value. The function returns true if the operand evaluates to false, or false if the operand evaluates to true.
| Parameter | Type | Description |
|---|---|---|
value | any | The operand to perform a logical NOT operation on. |
The function returns true if the operand evaluates to false, and false if the operand evaluates to true. If you don’t provide a parameter, the function returns true.
The evaluation follows these rules:
nullisfalse.- Boolean values are returned as-is.
0isfalse. Any non-zero number istrue.- An empty string is
false, and a non-empty string istrue. - Empty arrays and empty objects are
false. Non-empty arrays and objects aretrue. - Other values are treated as
false.