super-utils-plus
Version:
A superior alternative to Lodash with improved performance, TypeScript support, and developer experience
11 lines (10 loc) • 463 B
TypeScript
/**
* Checks if a number is between start and up to, but not including, end.
* If end is not specified, start is set to 0 and end to the original start.
*
* @param number - The number to check
* @param start - The start of the range or the end when used as a single argument
* @param end - The end of the range
* @returns True if the number is in range, else false
*/
export declare function inRange(number: number, start: number, end?: number): boolean;