Skip to content
jshacks.dev

Tag

generators

2 posts

Flat illustration of an editor window full of code, with the JavaScript, TypeScript, npm, Vite and Node.js logos.
Functions

Generator Use Cases Beyond Iteration

Five uses of JavaScript generators beyond looping: two-way communication, state machines, id sequences, chunked work and async flow with a runner. Node.js 24.

7 min read