indicesWhereAsync
indicesWhereAsync<
T>(iterable,predicate):AsyncIterableIterator<number>
Defined in: packages/core/src/iterable/async/indices-where.ts:16
Yields the zero-based index of every element satisfying predicate, rather
than the elements themselves.
The async counterpart of indicesWhere.
Time complexity: O(1) per element.
Type Parameters
Section titled “Type Parameters”T
Parameters
Section titled “Parameters”iterable
Section titled “iterable”The input iterable, sync or async.
predicate
Section titled “predicate”MaybeAsyncPredicate<[T, number]>
Receives each element and its zero-based index.
Returns
Section titled “Returns”AsyncIterableIterator<number>
An iterator over the matching indices, ascending.