|
5 years ago | |
---|---|---|
.. | ||
lib | 5 years ago | |
.npmignore | 5 years ago | |
README.md | 5 years ago | |
package.json | 5 years ago |
Turn async functions into ES2015 generators
$ npm install babel-plugin-transform-async-to-generator
.babelrc
(Recommended).babelrc
{
"plugins": ["transform-async-to-generator"]
}
$ babel --plugins transform-async-to-generator script.js
require("babel-core").transform("code", {
plugins: ["transform-async-to-generator"]
});