Vinyl
    Preparing search index...

    Function filterAsync

    • Filter an ArrayLike with an asynchronous predicate.

      Runs the predicate across all elements, then filters the elements by the booleans resolved by the predicate.

      Type Parameters

      • T

      Parameters

      • arrayLike: MaybePromise<ArrayLike<T>>

        The array-like object to filter

      • predicate: (value: T, index: number, array: ArrayLike<T>) => Promise<boolean>

        Async function that tests each element

      • Optionaloptions: { simultaneous?: number }

        Optional configuration object

        • Optional Readonlysimultaneous?: number

          Maximum number of predicates to run simultaneously (default: 1)

      Returns Promise<T[]>