1.2.0 • Published 1 year ago

just-in-range v1.2.0

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

just-in-range

Part of a library of zero-dependency npm modules that do just do one thing. Guilt-free utilities for every occasion.

🍦 Try it

npm install just-in-range
yarn add just-in-range

Check if number is within a given range

  import inRange from 'just-number-in-range'

/*
  inRange(2, 1, 10); // true
  inRange(15, 20); // true
  inRange(20, 21, 30); // false
  inRange(30, 21, 30); // false
  inRange(); // throws
  inRange(100); // throws
  inRange("js"); // throws
*/
1.2.0

1 year ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago