{{#is expr1 expr2}}

  • function

{{#is expr...}}BLOCK{{/is}}

Renders the BLOCK template within the current template.


  1. expr {can.stache.expression}Optional Variable

    An expression or key that references a value within the current or parent

  2. BLOCK {can.stache(template)}

    A template that is rendered if the result of comparsion expr1 and expr2 value is truthy.



If the key's value is truthy, the BLOCK is rendered with the current context and its value is returned; otherwise, an empty string.

The is helper compares expr1 and expr2 and renders the blocks accordingly.

{{#is expr1 expr2}}
    // truthy
    // falsey