Function inRange

Checks if a value is within a specified range.

inRange(10, 0, 20) // true
inRange(10, 0, 10, 'start-exclusive') // false
  • Parameters

    • value: number
    • start: number
    • end: number
    • Optionalbehaviour: "start-exclusive" | "end-exclusive" | "both-exclusive"

    Returns boolean