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