mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-22 07:23:01 +01:00
feat: add increment helper
This commit is contained in:
@@ -23,6 +23,7 @@ module.exports = function (utils, Benchpress, relative_path) {
|
||||
renderDigestAvatar,
|
||||
userAgentIcons,
|
||||
buildAvatar,
|
||||
increment,
|
||||
register,
|
||||
__escape: identity,
|
||||
};
|
||||
@@ -315,6 +316,10 @@ module.exports = function (utils, Benchpress, relative_path) {
|
||||
return output;
|
||||
}
|
||||
|
||||
function increment(value, inc) {
|
||||
return value + parseInt(inc, 10);
|
||||
}
|
||||
|
||||
function register() {
|
||||
Object.keys(helpers).forEach(function (helperName) {
|
||||
Benchpress.registerHelper(helperName, helpers[helperName]);
|
||||
|
||||
Reference in New Issue
Block a user