Let’s get serious about ES6 generator functions.
Several months have passed since support
functions and the
in Node.js v0.11.2. This news was
because generator syntax
much cleaner alternative to using callbacks when writing
asynchronous server-side code.
yieldexpressions only on the right-hand sides of assignment statements and variable declarations, or as standalone statements, whereas regenerator allows a
yieldexpression to appear anywhere an expression is permitted to appear.
- Regenerator aims to generate as little boilerplate as possible, whereas Traceur generates more than fifty lines of code for the simplest of generators.
- Regenerator transforms generator functions and nothing else, so you don't have to buy into the entire Traceur runtime just to get support for generators.
Please give the transformer a try below, and feel free to report bugs. Regenerator is well-tested and feature-complete, but we'd love your help in making it completely bulletproof!