3 ms·
CO https://github.com/tj/co https://github.com/tj/co in popularized this technique a few years ago. It implements something similar to the function you present
by asprouse 8y ago
CO https://github.com/tj/co https://github.com/tj/co in popularized this technique a few years ago. It implements something similar to the function you present here. Babel actually transforms async/await to generators (https://babeljs.io/docs/en/babel-plugin-transform-async-to-generator https://babeljs.io/docs/en/babel-plugin-transform-async-to-g...) when targeting environments that don't have native async/await support.