2016-10-10 03:43:44 +02:00
|
|
|
// 20.1.2.5 Number.isSafeInteger(number)
|
2017-04-20 03:09:25 +02:00
|
|
|
var $export = require('./$.export')
|
|
|
|
, isInteger = require('./$.is-integer')
|
2016-10-10 03:43:44 +02:00
|
|
|
, abs = Math.abs;
|
|
|
|
|
|
|
|
$export($export.S, 'Number', {
|
|
|
|
isSafeInteger: function isSafeInteger(number){
|
|
|
|
return isInteger(number) && abs(number) <= 0x1fffffffffffff;
|
|
|
|
}
|
|
|
|
});
|