Add partial and helper unregister APIs

Fixes #669
This commit is contained in:
kpdecker
2014-01-18 09:22:29 -06:00
parent 88c52ded2e
commit 311be67bde
+6
View File
@@ -38,6 +38,9 @@ HandlebarsEnvironment.prototype = {
this.helpers[name] = fn;
}
},
unregisterHelper: function(name) {
delete this.helpers[name];
},
registerPartial: function(name, str) {
if (toString.call(name) === objectType) {
@@ -45,6 +48,9 @@ HandlebarsEnvironment.prototype = {
} else {
this.partials[name] = str;
}
},
unregisterPartial: function(name) {
delete this.partials[name];
}
};