Articles in this section

isFalsey helper

The isFalsey helper returns true if the input value is falsy according to JavaScript rules. Falsey values include false, 0, "" (empty string), null, undefined, and NaN.

Usage

{{isFalsey value}}
  • value (required): Any input to evaluate.

Examples

Evaluate various falsey and truthy values

{{isFalsey record.a}}
{{isFalsey record.b}}
{{isFalsey record.c}}
{{isFalsey record.d}}
{{isFalsey record.e}}

Input:

{
  "record": {
    "a": 1,
    "b": 0,
    "c": "hello",
    "d": "",
    "e": null
  }
}

Output:

false
true
false
true
true

Conditional rendering example

{{#if (isFalsey record.value)}}
  Value is falsey
{{else}}
  Value is truthy
{{/if}}

Input:

{ "record": { "value": "" } }

Output:

Value is falsey

Tip

Tips
  • The helper follows JavaScript’s native falsy evaluation rules.

  • Use it to validate input, check optional fields, or guard conditional logic.

  • Combine with logical helpers (like #and or #or) for complex conditions.