includesAsync
includesAsync<
T>(iterable,item,comparator?,signal?):Promise<boolean>
Defined in: packages/core/src/iterable/async/includes.ts:18
Checks whether item occurs in iterable.
The async counterpart of includes.
Time complexity: O(n), short-circuiting on the first match.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”The iterable to search, sync or async.
T
The item to search for.
comparator?
Section titled “comparator?”EqualityComparator<T, T> = ...
The equality comparison function to use (default is
isEqual with “sameValueZero” strategy).
signal?
Section titled “signal?”AbortSignal
Aborts the search.
Returns
Section titled “Returns”Promise<boolean>
true if a matching item was found, false otherwise.