Closed
Description
Does Handlebars provide a shorthand for registering multiple helpers at once, so that Handlebars.registerHelper
doesn't have to be repeated multiple times in code?
I was thinking about being able to pass an object, like so:
Handlebars.registerHelper({
helper1: function () { ... },
helper2: function () { ... },
helper3: function () { ... }
});
The way I currently do it is this:
$.each({
helper1: function () { ... },
helper2: function () { ... },
helper3: function () { ... }
}, function ( name, handler ) {
Handlebars.registerHelper( name, handler );
});