Inverts truthiness and renders its block if the input is falsy. If the input is truthy, the {{else}} block runs.
{{#not value}}Block if falsey{{else}}Block if truthy{{/not}}
-
value (required): input value to negate
-
Check if a field is empty
{{#not record.empty}}Field is empty{{else}}Field has value{{/not}}Input:
{ "record": { "isEnabled": true, "empty": "", "count": 0 } }Output:
Field is empty
-
Check if a count is zero
{{#not record.count}}No items available{{else}}Items exist{{/not}}Input:
{ "record": { "count": 0 } }Output:
No items available
-
Empty array is truthy
{{#not record.items}}No items{{else}}Items array exists{{/not}}Input:
{ "record": { "items": [] } }Output:
Items array exists
Tip
-
Evaluates based on standard JavaScript truthy/falsy rules (
0,"",null,undefined, andfalseare falsy). -
Useful for conditionally displaying fallback messages or handling missing data.
-
Combine with other logical helpers (
#and,#or) for more complex conditions. -
Evaluate using standard JavaScript truthiness rules: 0, "", null, undefined, and false are falsy; non-empty strings (including "0" and "false"), non-zero numbers, objects, and arrays (even []) are truthy.