isInRange

isInRage

Checks if num is between min and max (including borders).

Import

import { isInRage } from '@fullstacksjs/toolbox';

Signature

function isInRange(num: number, min: number, max: number): boolean {}

Examples

isInRange(51, 0, 50)   // false
isInRange(-1, 0, 100)  // true
isInRange(100, 0, 100) // true
isInRange(0, 0, 100)   // true
isInRange(50, 0, 100)  // true