Version 1
[yaffs-website] / node_modules / core-js / library / modules / _to-integer.js
diff --git a/node_modules/core-js/library/modules/_to-integer.js b/node_modules/core-js/library/modules/_to-integer.js
new file mode 100644 (file)
index 0000000..f63baaf
--- /dev/null
@@ -0,0 +1,6 @@
+// 7.1.4 ToInteger
+var ceil  = Math.ceil
+  , floor = Math.floor;
+module.exports = function(it){
+  return isNaN(it = +it) ? 0 : (it > 0 ? floor : ceil)(it);
+};
\ No newline at end of file