Skip to content

IsBetween.js | Check if a number is between a minimum or a maximum number

License

Notifications You must be signed in to change notification settings

devbyray/is-between-js

Folders and files

NameName
Last commit message
Last commit date
Jan 27, 2020
Feb 8, 2020
Feb 8, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020
Jan 27, 2020

Repository files navigation

IsBetween.js

Build Status npm version

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.

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

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