Function some

  • Return true if at least 1 item returns true on the test function.

    Example

       pipe(
    itr8FromArray([ 1, 2, 3, 4, 5, 6 ]),
    some((x) => x > 2), // => [ true ]
    );

    The filter function can be asynchronous (in which case the resulting iterator will be asynchronous regardless of the input iterator)!

    Type Parameters

    • TIn

    Parameters

    • filterFn: ((TIn: any) => boolean | Promise<boolean>)
        • (TIn: any): boolean | Promise<boolean>
        • Parameters

          • TIn: any

          Returns boolean | Promise<boolean>

    Returns TTransIteratorSyncOrAsync<TIn, boolean>

Generated using TypeDoc