is-integer-in-range
Tests if a value is an integer in a specified range.
The range is inclusive of the start and end values.
Install
npm install --save is-integer-in-range
or
yarn add is-integer-in-range
Examples
;isIntegerInRange5, 1, 10; // -> trueisIntegerInRange51, 1, 10; // -> falseisIntegerInRange0, 1, 10; // -> falseisIntegerInRange1, 1, 10; // -> trueisIntegerInRange10, 1, 10; // -> trueisIntegerInRange11, 1, 10; // -> false
API
isIntegerInRange
Tests if the specified value is an integer in the specified range.
The range is inclusive of the start and end values.
;
isIntegerInRangeFn
Curried variant of isIntegerInRange
.
Takes a range specified as a start and end value, and returns a function that tests if a specified value is within the range.
The range is inclusive of the start and end values.
;