Hacker News new | ask | show | jobs
by voxtex 4053 days ago
I've found using promises with generators yields code very similar to async/await, without relying on experimental features.

https://github.com/tj/co

or

https://github.com/petkaantonov/bluebird/blob/master/API.md#...

2 comments

yes, async/await and generators are the same construct, represented by two different syntaxes. Each can be implemented in terms of the other.