Node-Red configuration
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.

es.number.is-safe-integer.js 397B

12345678910111213
  1. 'use strict';
  2. var $ = require('../internals/export');
  3. var isIntegralNumber = require('../internals/is-integral-number');
  4. var abs = Math.abs;
  5. // `Number.isSafeInteger` method
  6. // https://tc39.es/ecma262/#sec-number.issafeinteger
  7. $({ target: 'Number', stat: true }, {
  8. isSafeInteger: function isSafeInteger(number) {
  9. return isIntegralNumber(number) && abs(number) <= 0x1FFFFFFFFFFFFF;
  10. }
  11. });