summaryrefslogtreecommitdiff
path: root/src/node_modules/es-abstract/2018/ToInt32.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/node_modules/es-abstract/2018/ToInt32.js')
-rw-r--r--src/node_modules/es-abstract/2018/ToInt32.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/node_modules/es-abstract/2018/ToInt32.js b/src/node_modules/es-abstract/2018/ToInt32.js
new file mode 100644
index 0000000..a8d2680
--- /dev/null
+++ b/src/node_modules/es-abstract/2018/ToInt32.js
@@ -0,0 +1,9 @@
+'use strict';
+
+var ToNumber = require('./ToNumber');
+
+// http://www.ecma-international.org/ecma-262/5.1/#sec-9.5
+
+module.exports = function ToInt32(x) {
+ return ToNumber(x) >> 0;
+};