Skip to content

Instantly share code, notes, and snippets.

@eastridge
Created July 16, 2013 18:58
Show Gist options
  • Save eastridge/6011561 to your computer and use it in GitHub Desktop.
Save eastridge/6011561 to your computer and use it in GitHub Desktop.
Handlebars.registerHelper('special', function(arg, options) {
if (condition(arg)) {
return options.fn(this);
} else {
return options.inverse(this);
}
});
{{#special arg}}
{{else}}
{{/special}}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment