Bakhtina Sofya b84cb877be 1st comm | hai 2 semanas | |
---|---|---|
.. | ||
lib | hai 2 semanas | |
src | hai 2 semanas | |
LICENSE | hai 2 semanas | |
README.md | hai 2 semanas | |
package.json | hai 2 semanas |
Transform async/generator functions with regenerator
$ npm install regenerator-transform
.babelrc
(Recommended).babelrc
// without options
{
"plugins": ["regenerator-transform"]
}
// with options
{
"plugins": [
["regenerator-transform", {
asyncGenerators: false, // true by default
generators: false, // true by default
async: false // true by default
}]
]
}
$ babel --plugins regenerator-transform script.js
require("@babel/core").transformSync("code", {
plugins: ["regenerator-transform"]
});