handlebars-cond
v1.0.3
Published
Handlebars helper that allows you to use comparison conditions like a typical IF statement.
Downloads
548
Maintainers
Readme
handlebars-cond
Handlebars helper that allows you to use comparison conditions like a typical IF statement.
Usage
{{#cond 0 '<' 300}}
correct!
{{/cond}}
{{#cond 0 '>' 300}}
Are you sure?
{{else}}
I do not think so!
{{/cond}}
Parameters
| Argument | Description | |:----------|:------------| | lvalue | The first value to compare.| | operator | The comparison operator. Values: == === != !== < > <= >= && and || or typeof. | | rvalue | The second value to compare.