Number.isInteger(value)
// strict, matches only objects of type 'number' // excluding Infinity and NaN. function isNumber(n) { return typeof n === 'number' && isFinite(n); }