debian-mirror-gitlab/core-js/modules/esnext.math.signbit.js
2019-09-25 13:30:05 +05:30

10 lines
307 B
JavaScript

var $ = require('../internals/export');
// `Math.signbit` method
// https://github.com/tc39/proposal-Math.signbit
$({ target: 'Math', stat: true }, {
signbit: function signbit(x) {
// eslint-disable-next-line no-self-compare
return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
}
});