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

https://github.com/chrisantonellis/between.js

is this between that?
https://github.com/chrisantonellis/between.js

Last synced: 6 months ago
JSON representation

is this between that?

Awesome Lists containing this project

README

          

## between.js
between.js is a script that determines if a ```Number``` ( or a type that evaluates to ```Number``` ) is between two other numbers.

## Usage
```javascript
mynum = 4

mynum.between(2, 6) // True
mynum.between(6, 8) // False
mynum.between(4, 8, True) // True
```

## Function Reference
Direct function call:
```javascript
between(i, l, h, e = false)
```
Prototype method:
```javascript
(input).between(i, l, h, e = false)
```

## Arguments

* ### ```i```

type: Number, Date

**Input** value.

* ### ```l```

type: Number, Date

**Low** value.
The lower end of the range to compare against.

* ### ```h```

type: Number, Date

**High** value.
The higher end of the range to compare against.

* ### ```e```

type: Boolean

Or **equal** to.
If ```True```, the range compared against includes ```l``` and ```h```.