https://github.com/xotic750/is-integer-x
Determine whether the passed value is an integer.
https://github.com/xotic750/is-integer-x
browser isinteger javascript nodejs number
Last synced: 11 months ago
JSON representation
Determine whether the passed value is an integer.
- Host: GitHub
- URL: https://github.com/xotic750/is-integer-x
- Owner: Xotic750
- License: mit
- Created: 2017-09-02T23:11:06.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2023-01-04T22:54:28.000Z (about 3 years ago)
- Last Synced: 2025-04-30T20:32:00.589Z (11 months ago)
- Topics: browser, isinteger, javascript, nodejs, number
- Language: JavaScript
- Size: 2.5 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## 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**
```js
import isInteger from 'is-integer-x';
console.log(isInteger(0)); // true
console.log(isInteger(1)); // true
console.log(isInteger(-100000)); // true
console.log(isInteger(0.1)); // false
console.log(isInteger(Math.PI)); // false
console.log(isInteger(NaN)); // false
console.log(isInteger(Infinity)); // false
console.log(isInteger(-Infinity)); // false
console.log(isInteger('10')); // false
console.log(isInteger(true)); // false
console.log(isInteger(false)); // false
console.log(isInteger([1])); // false
```