Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/semigradsky/in-interval

Determines whether the number in the specified interval
https://github.com/semigradsky/in-interval

Last synced: 19 days ago
JSON representation

Determines whether the number in the specified interval

Awesome Lists containing this project

README

        

# In interval [![Build Status](https://travis-ci.org/Semigradsky/in-interval.svg)](https://travis-ci.org/Semigradsky/in-interval) [![Dependency Status](https://david-dm.org/Semigradsky/in-interval.svg)](https://david-dm.org/Semigradsky/in-interval)

> Determines whether the number in the specified interval.

## Install

```sh
$ npm install --save in-interval
```

## Usage

```js
var inRange = require('in-interval');

inRange(0, '[-10,Infinity)');
//=> true

inRange(Math.PI, {
from: {
value: -1,
included: false
},
to: {
value: 1,
included: false
}
});
//=> false

```

## License

MIT © Dmitry Semigradsky