debian-mirror-gitlab/core-js/modules/esnext.math.signbit.js

10 lines
259 B
JavaScript
Raw Normal View History

2019-09-25 13:30:05 +05:30
var $ = require('../internals/export');
// `Math.signbit` method
// https://github.com/tc39/proposal-Math.signbit
$({ target: 'Math', stat: true }, {
signbit: function signbit(x) {
return (x = +x) != x ? x : x == 0 ? 1 / x == Infinity : x > 0;
}
});