is-integer-x
Determine whether the passed value is an integer.
module.exports(value)
⇒ boolean
⏏
This method determines whether the passed value is an integer.
Kind: Exported function
Returns: boolean
- A Boolean indicating whether or not the given value is an integer.
Param | Type | Description |
---|
value | * | The value to be tested for being an integer. |
Example
import isInteger from 'is-integer-x';
console.log(isInteger(0));
console.log(isInteger(1));
console.log(isInteger(-100000));
console.log(isInteger(0.1));
console.log(isInteger(Math.PI));
console.log(isInteger(NaN));
console.log(isInteger(Infinity));
console.log(isInteger(-Infinity));
console.log(isInteger('10'));
console.log(isInteger(true));
console.log(isInteger(false));
console.log(isInteger([1]));