-
Notifications
You must be signed in to change notification settings - Fork 2k
Registering multiple helpers at once? #369
Copy link
Copy link
Closed
Labels
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 );
});
Reactions are currently unavailable