|
il y a 5 ans | |
---|---|---|
.. | ||
lib | il y a 5 ans | |
.npmignore | il y a 5 ans | |
README.md | il y a 5 ans | |
package.json | il y a 5 ans |
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"]
});