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