Function filterValid

  • Filter an array of inputs with a validator

    Type Parameters

    • T

      The validated type

    Parameters

    Returns ((input) => T[])

      • (input): T[]
      • Parameters

        • input: unknown

        Returns T[]

    Example

    filterValid(isNumber)(["1", 2, "3"]) >> [2];