GoScrobble/web/node_modules/core-js-pure/modules/es.number.is-safe-integer.js

13 lines
361 B
JavaScript
Raw Normal View History

2022-04-25 02:47:15 +00:00
var $ = require('../internals/export');
var isInteger = require('../internals/is-integer');
var abs = Math.abs;
// `Number.isSafeInteger` method
// https://tc39.es/ecma262/#sec-number.issafeinteger
$({ target: 'Number', stat: true }, {
isSafeInteger: function isSafeInteger(number) {
return isInteger(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
}
});