Hacker News new | past | comments | ask | show | jobs | submit login

The author has a beef with the ES5-compatible code that Babel emits for async/await, but you don't have to go that far.

If you can get away with ignoring IE and Safari, the latest versions of Edge, Firefox, Chrome, and Opera all have native support for promises and generators, which can implement async/await style concurrency much more tersely: https://babeljs.io/docs/plugins/transform-async-to-generator...

There's also Kneden (https://github.com/marten-de-vries/kneden) which, combined with a Promise polyfill, should transpile async/await into relatively clean chains of promises.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: