|
5 years ago | |
---|---|---|
.. | ||
.test | 5 years ago | |
lib | 5 years ago | |
src | 5 years ago | |
.npmignore | 5 years ago | |
LICENSE | 5 years ago | |
PATENTS | 5 years ago | |
README.md | 5 years ago | |
package.json | 5 years ago |
Transform async/generator functions with regenerator
$ npm install babel-plugin-transform-regenerator
.babelrc
(Recommended).babelrc
// without options
{
"plugins": ["transform-regenerator"]
}
// with options
{
"plugins": [
["transform-regenerator", {
asyncGenerators: false, // true by default
generators: false, // true by default
async: false // true by default
}]
]
}
$ babel --plugins transform-regenerator script.js
require("babel-core").transform("code", {
plugins: ["transform-regenerator"]
});