is-integer.js 281 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 var isObject = require('../internals/is-object'); var floor = Math.floor; // `Number.isInteger` method implementation // https://tc39.github.io/ecma262/#sec-number.isinteger module.exports = function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; };