aboutsummaryrefslogtreecommitdiff
path: root/node_modules/core-js/modules/_math-sign.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/core-js/modules/_math-sign.js')
-rw-r--r--node_modules/core-js/modules/_math-sign.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/node_modules/core-js/modules/_math-sign.js b/node_modules/core-js/modules/_math-sign.js
new file mode 100644
index 00000000..7a46b9d0
--- /dev/null
+++ b/node_modules/core-js/modules/_math-sign.js
@@ -0,0 +1,5 @@
+// 20.2.2.28 Math.sign(x)
+module.exports = Math.sign || function sign(x) {
+ // eslint-disable-next-line no-self-compare
+ return (x = +x) == 0 || x != x ? x : x < 0 ? -1 : 1;
+};