Created
May 31, 2013 14:46
-
-
Save stubotnik/5685486 to your computer and use it in GitHub Desktop.
Crude merge of unspecified number of name, value pairs into context
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
Handlebars.registerHelper 'merge', (context, args..., options) -> | |
context[args[i]] = args[i+1] for i in [0...args.length] by 2 | |
options.fn context |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment