is-bounded-number
Version:
Check if an input is numeric, and within a given bound
15 lines (10 loc) • 779 B
Markdown
[](https://badge.fury.io/js/is-bounded-number)[](https://travis-ci.org/davidryan59)
Checks that a number is numeric, finite, and within a specific range (default is +/- 1e15). Find [module on npm](https://www.npmjs.com/package/is-bounded-number) and [code repo with examples on GitHub](https://github.com/davidryan59/is-bounded-number).
## API
``` js
var ibn = require('is-bounded-number');
ibn(input); // Returns boolean. Checks input numeric and bounded by +/- 1e15
ibn(input, bound); // Returns boolean
```
Use `npm i is-bounded-number` to install. For full examples see GitHub `examples` directory.