• Check if a number is between 2 numbers

    Parameters

    • input: number
    • min: number
    • max: number

    Returns boolean

    Example

    import { number } from "@rjweb/utils"

    number.between(5, 0, 10) // true
    number.between(5, 10, 20) // false
    number.between(5, 5, 5) // true

    Since

    1.12.17

    Supports

    nodejs, browser