A small collection of useful helpers for Handlebars.js.
Released under the WTFPL. Do whatever with it; if you make improvements it'd be nice if you contributed them back but it's by no means required. Use in any project, commercial or otherwise. No warranty is provided.
{{#if_eq x compare=y}} ... {{/if_eq}}
{{#unless_eq x compare=y}} ... {{/unless_eq}}
{{#if_gt x compare=y}} ... {{/if_gt}}
{{#unless_gt x compare=y}} ... {{/unless_gt}}
{{#if_gteq x compare=y}} ... {{/if_gteq}}
{{#unless_gteq x compare=y}} ... {{/unless_gteq}}
{{#if_lt x compare=y}} ... {{/if_lt}}
{{#unless_lt x compare=y}} ... {{/unless_lt}}
{{#if_lteq x compare=y}} ... {{/if_lteq}}
{{#unless_lteq x compare=y}} ... {{/unless_lteq}}
Convert new lines (\r\n
, \n\r
, \r
, \n
) to line breaks
{{nl2br description}}