es6.number.is-safe-integer.js 294 B

12345678910
  1. // 20.1.2.5 Number.isSafeInteger(number)
  2. var $export = require('./_export');
  3. var isInteger = require('./_is-integer');
  4. var abs = Math.abs;
  5. $export($export.S, 'Number', {
  6. isSafeInteger: function isSafeInteger(number) {
  7. return isInteger(number) && abs(number) <= 0x1fffffffffffff;
  8. }
  9. });