31 lines
582 B
Markdown
31 lines
582 B
Markdown
|
# is-finite [![Build Status](https://travis-ci.org/sindresorhus/is-finite.svg?branch=master)](https://travis-ci.org/sindresorhus/is-finite)
|
||
|
|
||
|
> ES6 [`Number.isFinite()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number/isFinite) ponyfill
|
||
|
|
||
|
> Ponyfill: A polyfill that doesn't overwrite the native method
|
||
|
|
||
|
|
||
|
## Install
|
||
|
|
||
|
```sh
|
||
|
$ npm install --save is-finite
|
||
|
```
|
||
|
|
||
|
|
||
|
## Usage
|
||
|
|
||
|
```js
|
||
|
var numIsFinite = require('is-finite');
|
||
|
|
||
|
numIsFinite(4);
|
||
|
//=> true
|
||
|
|
||
|
numIsFinite(Infinity);
|
||
|
//=> false
|
||
|
```
|
||
|
|
||
|
|
||
|
## License
|
||
|
|
||
|
MIT © [Sindre Sorhus](http://sindresorhus.com)
|