Skip to content

Instantly share code, notes, and snippets.

@stubotnik
Created May 31, 2013 14:46
Show Gist options
  • Save stubotnik/5685486 to your computer and use it in GitHub Desktop.
Save stubotnik/5685486 to your computer and use it in GitHub Desktop.
Crude merge of unspecified number of name, value pairs into context
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