Skip to content

Commit

Permalink
Add partial and helper unregister APIs
Browse files Browse the repository at this point in the history
Fixes #669
  • Loading branch information
kpdecker committed Jan 18, 2014
1 parent 88c52de commit 311be67
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/handlebars/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,19 @@ HandlebarsEnvironment.prototype = {
this.helpers[name] = fn;
}
},
unregisterHelper: function(name) {
delete this.helpers[name];
},

registerPartial: function(name, str) {
if (toString.call(name) === objectType) {
Utils.extend(this.partials, name);
} else {
this.partials[name] = str;
}
},
unregisterPartial: function(name) {
delete this.partials[name];
}
};

Expand Down

0 comments on commit 311be67

Please sign in to comment.