hexo/node_modules/core-js/modules/_math-sign.js

6 lines
184 B
JavaScript
Raw Normal View History

2023-10-03 11:14:36 +08:00
// 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;
};