is-integer-in-range
Version:
Tests if a value is an integer in a specified range
16 lines (15 loc) • 582 B
TypeScript
/**
* Tests if the specified value is an integer in the specified range.
*
* The range is inclusive of the start and end values.
*/
export default function isIntegerInRange(value: number, start: number, end: number): boolean;
/**
* 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 an integer within the range.
*
* The range is inclusive of the start and end values.
*/
export declare function isIntegerInRangeFn(start: number, end: number): (value: number) => boolean;