https://github.com/devbyray/is-between-js
IsBetween.js | Check if a number is between a minimum or a maximum number
https://github.com/devbyray/is-between-js
between check javascript microlibrary nodejs number range typescript
Last synced: about 1 month ago
JSON representation
IsBetween.js | Check if a number is between a minimum or a maximum number
- Host: GitHub
- URL: https://github.com/devbyray/is-between-js
- Owner: devbyray
- License: mit
- Created: 2020-01-27T10:43:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-08T20:47:29.000Z (over 6 years ago)
- Last Synced: 2025-07-14T20:11:55.509Z (11 months ago)
- Topics: between, check, javascript, microlibrary, nodejs, number, range, typescript
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/is-between-js
- Size: 303 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# IsBetween.js
[](https://travis-ci.com/raymonschouwenaar/is-between-js)
[](https://badge.fury.io/js/is-between-js)
## Install
```
npm i is-between-js
```
## How to use?
You can import the isBetween function in your JavaScript/TypeScript file and use it like this!
The TypeScript types are included in the library.
```javascript
import { isBetween } from 'is-between-js'
isBetween(1).min(0).max(10).calc() // returns true
isBetween(10).min(0).max(9).calc() // returns false
```
or
```javascript
import { Between } from 'is-between-js'
const between = new Between()
between.value(1).min(0).max(10).calc() // returns true
between.value(10).min(0).max(9).calc() // returns false
```