Function all

  • Merge an array of validated results using a logical AND

    Type Parameters

    • T

      The validated type

    Parameters

    • results: Validated<T>[]

      The validated results to merge

    Returns Validated<T[]>

    Example

    all(["1", 2, "3"].map(isNumber)) >>
    {
    valid: false,
    error: ['Not a number: "1"', 'Not a number: "3"'],
    };