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?
- Host: GitHub
- URL: https://github.com/chrisantonellis/between.js
- Owner: chrisantonellis
- License: mit
- Created: 2016-05-19T20:24:37.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2016-05-26T16:46:45.000Z (over 9 years ago)
- Last Synced: 2025-03-23T18:36:07.514Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 448 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- Changelog: CHANGELOG.md
- License: LICENSE
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```.