· via dev.to (home feed)
TC39 iterator helpers reach Baseline 2026, bringing native lazy iteration to all major browsers
ES2025's iterator helpers are Baseline 2026 across evergreen browsers and Node.js LTS, letting developers swap eager array chains and Lodash pipelines for native lazy iteration.
Iterator helpers reach Baseline
TC39's iterator helpers, standardized as part of ES2025 after reaching Stage 4, are now Baseline Newly Available. According to a dev.to write-up, the methods ship natively in Chrome 122, Safari 17.4, Firefox 131, Node.js 22 LTS and Bun 1.0, and as of September 2026 all current evergreen browsers support them without a polyfill.
The feature adds chainable counterparts to familiar array methods — .map(), .filter(), .take(), .drop() and .flatMap() — plus .toArray() to materialize results. Because they operate on iterators rather than arrays, they also apply to Maps, Sets, generators and infinite sequences, and TypeScript 5.7 and later ships full type definitions for them.
The cost of eager array chains
The article's motivation is memory. Array methods are eager: each .map() or .filter() in a chain allocates a complete intermediate array. Run five chained operations over a 50,000-item dataset and the engine builds five full arrays before the final result exists. In the article's worked example, a filter/map/filter/sort/slice pipeline peaks above 80,000 allocated objects just to return ten rows, because a slice at the end still pays to transform every input item first.
Teams have long accepted this tradeoff because array methods were the only chainable option, and the alternative — imperative loops with manual accumulation — sacrifices readability.
Lazy evaluation changes the arithmetic
Iterator helpers work differently. Every helper wraps an iterator in another iterator, and nothing is computed until something pulls values through .next(). A terminal step like .toArray() drives the whole chain from the end: the take(10) wrapper asks its upstream filter for a value, that filter asks the map, and the request travels down to the source. Once ten items have passed through, the wrappers stop asking and the remaining data is never touched.
The upshot is that the amount of work tracks the size of the output, not the input. A pipeline that emits ten results from a million records only processes as many items as its filters let through, and peak memory stays roughly flat as the source collection grows.
Replacing Lodash chains
Before native helpers, Lodash's .chain()/.value() pattern was the standard way to get lazy, chainable pipelines, at the cost of a roughly 70KB dependency. The dev.to piece argues the built-in methods now cover the common Lodash operations while shipping zero additional bytes.
The article also cites reports from teams that adopted iterator helpers in production: memory reductions of 40-60% in data-heavy pipelines and 2-3x throughput gains on large datasets. Those figures are self-reported adoption claims rather than published benchmarks, so the exact magnitude deserves caution — but the direction follows directly from eliminating intermediate allocations.
Why it matters
Baseline status removes the last adoption blocker: code using iterator helpers now runs unmodified in Chrome, Safari and Firefox, as well as Node.js LTS and Bun. Teams processing API responses, database query results or file streams get pipelines that stay readable without paying to transform items they will throw away, and infinite sequences become practical to consume rather than dangerous to touch.
It also erodes a long-standing reason to bundle Lodash for functional data pipelines — one more utility library the platform has absorbed. The caveat is definitional: Baseline Newly Available covers only current evergreen browsers, so anything targeting older environments still needs transpilation or a polyfill.
- #javascript
- #tc39
- #ecmascript
- #web-standards
- #performance