is-integerish
v1.0.4
Published
A function to check if a value is an integer, or a string which parses to an integer value.
Downloads
3
Readme
isIntegerish
A function to check if a value is an integer, or a string which parses to an integer value
Install
npm install --save is-integerish
Example
const isIntegerish = require('is-integerish');
console.log(isIntegerish(10)); // true
console.log(isIntegerish('10')); // true
console.log(isIntegerish(1.0)); // true
console.log(isIntegerish("not an integer")); // false
console.log(isIntegerish(5.5)); // false