- Preparing search index...
- The search index is not available
@giraugh/tools
- filterAsync<T>(array, asyncPredicateFn): Promise<T[]>
-
Parameters
-
array: T[]
-
asyncPredicateFn: ((value, i, arr) => Promise<boolean>)
-
- (value, i, arr): Promise<boolean>
-
Parameters
-
value: T
-
i: number
-
arr: T[]
Returns Promise<boolean>
Returns Promise<T[]>
Filter an array in parallel using an async predicate function.
Returns
a promise of the filtered array. it will resolve when all of the async predicates resolve
Example