Function createTypedArrayValidator

  • Creates a validator function that checks whether the input is an array where all elements are valid according to every validator provided.

    Type Parameters

    • O

    Parameters

    • validators: ((value) => boolean)[]

      An array of validator functions.

    • Optional name: string

      The name of the validator function. If not provided, the name will be derived from the validator functions.

    Returns ((array) => boolean)

      • (array): boolean
      • Parameters

        • array: unknown

        Returns boolean

    Throws

    TypeError - if no name is provided and not all validators are named functions.

Generated using TypeDoc