Function between

  • Takes a start and end and returns a boolean if value number or string is between them.

    Example

    const between0 = between(0);
    const between0And10 = between0(10);

    between0And10(5); // true
    between0And10(-1); // false
    between0And10(11); // false

    Returns

    Curried function with start in context.

    Parameters

    • start: string | Numeric

      Minimum boundary.

    Returns ((end: string | Numeric) => ((value: string | Numeric) => boolean))

      • (end: string | Numeric): ((value: string | Numeric) => boolean)
      • Parameters

        • end: string | Numeric

        Returns ((value: string | Numeric) => boolean)

          • (value: string | Numeric): boolean
          • Parameters

            • value: string | Numeric

            Returns boolean