Skip to content

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.

T

Iterable<T>

The input iterable.

Predicate<[T, number]>

Receives each element and its zero-based index.

IterableIterator<number>

An iterator over the matching indices, ascending.