feat: add increment helper

This commit is contained in:
Barış Soner Uşaklı
2023-01-27 13:51:43 -05:00
parent 5d2a498cb2
commit f706de3bcf

View File

@@ -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]);