summaryrefslogtreecommitdiff
path: root/src/node_modules/es-abstract/helpers/mod.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_modules/es-abstract/helpers/mod.js')
-rw-r--r--src/node_modules/es-abstract/helpers/mod.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node_modules/es-abstract/helpers/mod.js b/src/node_modules/es-abstract/helpers/mod.js
new file mode 100644
index 0000000..67c8b78
--- /dev/null
+++ b/src/node_modules/es-abstract/helpers/mod.js
@@ -0,0 +1,8 @@
+'use strict';
+
+var $floor = Math.floor;
+
+module.exports = function mod(number, modulo) {
+ var remain = number % modulo;
+ return $floor(remain >= 0 ? remain : remain + modulo);
+};