Created
April 6, 2016 13:00
-
-
Save nataliefl/25f92e1d991a9261443fffdb1eaf0c13 to your computer and use it in GitHub Desktop.
ifnoteq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* If not equal | |
* {{#ifnoteq "valueA" "valueB"}} ... {{else}} ... {{/if}} | |
*/ | |
Handlebars.registerHelper('ifnoteq', function ifnoteq(a, b, opts) { | |
return (a != b) ? opts.fn(this) : opts.inverse(this); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment