Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/parshap/js-is-integer
ES2015 (ES6) Number.isInteger polyfill
https://github.com/parshap/js-is-integer
Last synced: about 2 months ago
JSON representation
ES2015 (ES6) Number.isInteger polyfill
- Host: GitHub
- URL: https://github.com/parshap/js-is-integer
- Owner: parshap
- License: wtfpl
- Created: 2013-08-30T22:35:02.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2017-05-05T08:48:06.000Z (over 7 years ago)
- Last Synced: 2024-05-18T21:43:01.067Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 15.6 KB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ponyfills - is-integer - [`Number.isInteger`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger) (Numbers)
README
# is-integer [![build status](https://secure.travis-ci.org/parshap/js-is-integer.svg?branch=master)](http://travis-ci.org/parshap/js-is-integer)
ES2015 (ES6) [`Number.isInteger`][isInteger] polyfill implemented in
ES3.## Example
```js
var isInteger = require("is-integer");
isInteger("hello") // -> false
isInteger(4) // -> true
isInteger(4.0) // -> true
isInteger(4.1) // -> false
```## API
### `var isInteger = require("is-integer")`
> Determines whether the provided value is an integer.
See [`Number.isInteger`][isInteger].
[isInteger]: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isInteger "Number.isInteger - MDN Documentation"
## Install
```
npm install is-integer
```