shim.js 244 B

12345678910
  1. "use strict";
  2. var isInteger = require("../is-integer/shim")
  3. , maxValue = require("../max-safe-integer")
  4. , abs = Math.abs;
  5. module.exports = function (value) {
  6. if (!isInteger(value)) return false;
  7. return abs(value) <= maxValue;
  8. };