DEV Community

Discussion on: 3 use cases for ES6 generators

Collapse
 
cipharius profile image
Valts Liepiņš

Recently I naturally settled on generators to implement a streaming API endpoint. It executes a long running batch process where after processing single batch, progress is reported on the long running response.

I think it ended up being much cleaner than the alternative of processing in a callback.