mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-22 16:35:14 +00:00
724 B
724 B
regenerator-transform
Transform async/generator functions with regenerator
Installation
$ npm install regenerator-transform
Usage
Via .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
}]
]
}
Via CLI
$ babel --plugins regenerator-transform script.js
Via Node API
require("@babel/core").transformSync("code", {
plugins: ["regenerator-transform"]
});