aboutsummaryrefslogtreecommitdiff
path: root/node_modules/es-abstract/helpers/mod.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/es-abstract/helpers/mod.js')
-rw-r--r--node_modules/es-abstract/helpers/mod.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/node_modules/es-abstract/helpers/mod.js b/node_modules/es-abstract/helpers/mod.js
new file mode 100644
index 00000000..5867fd97
--- /dev/null
+++ b/node_modules/es-abstract/helpers/mod.js
@@ -0,0 +1,4 @@
+module.exports = function mod(number, modulo) {
+ var remain = number % modulo;
+ return Math.floor(remain >= 0 ? remain : remain + modulo);
+};