Skip to main content

Harshal V. LADHE

JavaScript Iterator Helpers

Lazy `map`, `filter`, `take`, `drop` and other helpers on JavaScript iterators, added in ES2025, for working with generators and infinite sequences.

Content tagged iterator-helpers

  • Snippet:First N Matches from Any Iterable with filter() and take()

    Get the first N matches and stop reading.
    Return the first N matches from any iterable with Iterator.from(), filter() and take(), stopping as soon as it has enough, even on infinite sequences.
    Published at:
    Categories:JavaScript
    Estimated reading time:4 min read
  • Tutorial:Iterator Helpers: Lazy Pipelines over Any Iterator

    Map, filter and take over any iterator, lazily.
    Use ES2025 iterator helpers (map, filter, take, drop, flatMap, reduce, Iterator.from) to build lazy pipelines over generators, Sets, Maps and infinite sequences.
    Published at:
    Categories:JavaScript
    Estimated reading time:10 min read
  • Tutorial:JavaScript Iterator chunks(), windows(), includes() and join()

    Group, window, search and join any iterator natively.
    Use JavaScript's new iterator chunks(), windows(), includes() and join() for batching, moving averages and calendar rows, with edge cases and fallbacks.
    Published at:
    Categories:JavaScript
    Estimated reading time:13 min read
  • Post:What's New in ES2026: Every Feature Explained

    Every ES2026 feature, with examples and browser support.
    Every ES2026 feature with examples: Map upsert, JSON.parse source text, Iterator.concat, Uint8Array Base64, Math.sumPrecise, Error.isError and Array.fromAsync.
    Published at:
    Categories:JavaScript
    Estimated reading time:13 min read
  • Post:What's New in ES2027: Temporal, using and More

    Temporal, using and five more confirmed ES2027 features.
    Every confirmed ES2027 feature as of November 2026: Temporal, using, Iterator.zip, chunks, windows, join, includes and Atomics.pause, with examples.
    Published at:
    Categories:JavaScript
    Estimated reading time:15 min read