screeps-regenerator-transform
v1.0.1
Published
Explode async and generator functions into a state machine.
Downloads
12
Maintainers
Readme
screeps-regenerator-transform
Transform async/generator functions with screeps-regenerator
Installation
$ npm install screeps-regenerator-transform
Usage
Via .babelrc
(Recommended)
.babelrc
// without options
{
"plugins": ["screeps-regenerator-transform"]
}
// with options
{
"plugins": [
["screeps-regenerator-transform", {
asyncGenerators: false, // true by default
generators: false, // true by default
async: false // true by default
}]
]
}
Via CLI
$ babel --plugins screeps-regenerator-transform script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["screeps-regenerator-transform"]
});