Added modifier to skills
This commit is contained in:
@@ -64,6 +64,12 @@ export const RegisterHandlebars = function () {
|
||||
return objects.join("");
|
||||
});
|
||||
|
||||
// Make the sum of values
|
||||
Handlebars.registerHelper('sum', function(...nb) {
|
||||
nb.pop(); // remove this function call
|
||||
return nb.reduce((acc, n) => acc + Number(n ?? 0), 0);
|
||||
});
|
||||
|
||||
// Add a setter
|
||||
Handlebars.registerHelper("setVar", function (varName, varValue, options) {
|
||||
options.data.root[varName] = varValue;
|
||||
|
||||
Reference in New Issue
Block a user