ES2015 (ES6) Number.isInteger
polyfill implemented in
ES3.
var isInteger = require("is-integer");
isInteger("hello") // -> false
isInteger(4) // -> true
isInteger(4.0) // -> true
isInteger(4.1) // -> false
Determines whether the provided value is an integer.
See Number.isInteger
.
npm install is-integer