2016-10-10 03:43:44 +02:00
|
|
|
// 20.1.2.5 Number.isSafeInteger(number)
|
2017-08-14 05:01:11 +02:00
|
|
|
var $export = require('./_export');
|
|
|
|
var isInteger = require('./_is-integer');
|
|
|
|
var abs = Math.abs;
|
2016-10-10 03:43:44 +02:00
|
|
|
|
|
|
|
$export($export.S, 'Number', {
|
2017-08-14 05:01:11 +02:00
|
|
|
isSafeInteger: function isSafeInteger(number) {
|
2016-10-10 03:43:44 +02:00
|
|
|
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
|
|
|
|
}
|
2017-08-14 05:01:11 +02:00
|
|
|
});
|