number-is-finite.js 350 B

1234567891011
  1. 'use strict';
  2. var global = require('../internals/global');
  3. var globalIsFinite = global.isFinite;
  4. // `Number.isFinite` method
  5. // https://tc39.es/ecma262/#sec-number.isfinite
  6. // eslint-disable-next-line es/no-number-isfinite -- safe
  7. module.exports = Number.isFinite || function isFinite(it) {
  8. return typeof it == 'number' && globalIsFinite(it);
  9. };