1.0.3 • Published 7 years ago

handlebars-cond v1.0.3

Weekly downloads
18
License
GPL-3.0
Repository
github
Last release
7 years ago

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

ArgumentDescription
lvalueThe first value to compare.
operatorThe comparison operator. Values: == === != !== < > <= >= && and || or typeof.
rvalueThe second value to compare.