Skip to content

feat: iterator chain / concatenation (lazy concat of iterables) - #1917

Open
hazrid93 wants to merge 1 commit into
toss:mainfrom
hazrid93:hazrid93/69_771
Open

feat: iterator chain / concatenation (lazy concat of iterables)#1917
hazrid93 wants to merge 1 commit into
toss:mainfrom
hazrid93:hazrid93/69_771

Conversation

@hazrid93

Copy link
Copy Markdown

Closes #771.

Add chain(...iterables): a lazy generator that yields every element of every iterable, in order, without an intermediate array. Works with any iterable: arrays, strings, Sets, generators. Returns an IterableIterator, so callers can Array.from(chain(...)), spread it, or use .next().

@vercel

vercel Bot commented Jul 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
es-toolkit Ready Ready Preview, Comment Jul 20, 2026 11:22am

Request Review

Closes toss#771.

Add chain(...iterables): a lazy generator that yields every element of every iterable, in order, without an intermediate array. Works with any iterable: arrays, strings, Sets, generators. Returns an IterableIterator, so callers can `Array.from(chain(...))`, spread it, or use `.next()`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature: iterator chain / concatenation

1 participant