SHIFT + D

filter async

Updated on August 22, 2024Source codeTests

createFilterAsync is a pipe that asynchronously transforms an array to a filtered toArray.

Create filter

Call createFilterAsync with these parameters to create your filter function:

Parameter
Type
Required
Description
predicate
Function
yes

A function that returns a Promise that resolves to a boolean indicating whether or not an item meets your filter condition.

predicate receives an item (any data type) and the item's index (number) as parameters.

everyfilter

Edit doc on GitHub

ON THIS PAGE

filter asyncCreate filter