You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
383 B
12 lines
383 B
var $ = require('../internals/export');
|
|
var isIntegralNumber = require('../internals/is-integral-number');
|
|
|
|
var abs = Math.abs;
|
|
|
|
// `Number.isSafeInteger` method
|
|
// https://tc39.es/ecma262/#sec-number.issafeinteger
|
|
$({ target: 'Number', stat: true }, {
|
|
isSafeInteger: function isSafeInteger(number) {
|
|
return isIntegralNumber(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
|
|
}
|
|
});
|
|
|