is-integral-number.js 350 B

12345678910
  1. var isObject = require('../internals/is-object');
  2. var floor = Math.floor;
  3. // `IsIntegralNumber` abstract operation
  4. // https://tc39.es/ecma262/#sec-isintegralnumber
  5. // eslint-disable-next-line es/no-number-isinteger -- safe
  6. module.exports = Number.isInteger || function isInteger(it) {
  7. return !isObject(it) && isFinite(it) && floor(it) === it;
  8. };