4 ms·
Babel can transform async functions into Bluebird coroutines, so the best of both worlds - https://www.npmjs.com/package/babel-plugin-transform-async-to-module-
by phpnode 11y ago
Babel can transform async functions into Bluebird coroutines, so the best of both worlds - https://www.npmjs.com/package/babel-plugin-transform-async-to-module-method https://www.npmjs.com/package/babel-plugin-transform-async-t...
- esailija 11y agoYes but with this you lose the powerful features I just mentioned: automatic resource cleanup[1], cancellation, yield handlers.. don't you? 1. https://github.com/petkaantonov/bluebird/issues/1014 https://github.com/petkaantonov/bluebird/issues/1014
- phpnode 11y agoNo I think those should work with async functions as it is literally just translating `async` -> `yield`, but worth investigating.