A lazy iterator wrapper that adds array-style combinators (map, filter, take, reduce, etc.) over any iterable. Transformations are evaluated lazily and return new Itr instances, so chains do not materialize intermediate arrays.
map
filter
take
reduce
Itr
The element type produced by the iterator.
Wrap a source iterable, capturing its iterator for lazy consumption.
The source iterable to wrap.
Default iterator to enable for...of usage.
for...of
Each element of the underlying iterator in order.
Skip the first n elements.
n
The number of leading elements to skip.
A new Itr over the elements after the first n.
Check if all elements match a condition.
Returns true for an element that satisfies the condition.
true
true if every element matches.
Filter values to a new Itr.
Returns true for each element to keep.
A new Itr over the matching elements.
Find the first element that matches a condition.
Returns true for the element to find.
The first matching element, or undefined if none match.
undefined
Apply a function to each element.
Invoked with each element and its index.
Check if any element matches the specified value
The value to search for (strict equality).
true if the value is present.
Map values to a new Itr.
Maps each element and its index to a new value.
A new Itr over the mapped values.
Return the next element in the iterator.
Optional value forwarded to the underlying iterator's next.
next
The next iterator result.
Reduce to a single value.
Combines the accumulator with each element and its index.
The initial accumulator value.
The final accumulated value.
Check if some elements match a condition.
Returns true for a matching element.
true if at least one element matches.
Take the first n elements.
The maximum number of elements to yield.
A new Itr over the first n elements.
Convert to an array.
An array of all remaining elements.
Static
Create a new Itr instance from an iterable.
A new Itr over the iterable.
A lazy iterator wrapper that adds array-style combinators (
map,filter,take,reduce, etc.) over any iterable. Transformations are evaluated lazily and return newItrinstances, so chains do not materialize intermediate arrays.