Browse Source

feat: add `$modulo` function

Ahmad Kholid 2 years ago
parent
commit
99ac9403a8
1 changed files with 3 additions and 0 deletions
  1. 3 0
      src/utils/referenceData/mustacheReplacer.js

+ 3 - 0
src/utils/referenceData/mustacheReplacer.js

@@ -129,6 +129,9 @@ export const functions = {
 
     return value.toUpperCase();
   },
+  modulo(value, divisor) {
+    return +value % +divisor;
+  },
 };
 
 export function extractStrFunction(str) {