6 lines
207 B
JavaScript
6 lines
207 B
JavaScript
// 20.1.2.3 Number.isInteger(number)
|
|
var isObject = require('./$.is-object')
|
|
, floor = Math.floor;
|
|
module.exports = function isInteger(it){
|
|
return !isObject(it) && isFinite(it) && floor(it) === it;
|
|
}; |