Automatically add yield to generator calls.
$ npm install auto-yield
var autoYield = require('auto-yield')
var code = autoYield(`
function main () {
move()
}
function * move () {
yield 'moving'
}
`) =>
`function* main() {
yield move();
}
function* move() {
yield 'moving';
}`code- code to transformglobalGens- array of global names or object names that are generators or have generatorssecondOrderGens- array of functions that return generators
Returns: transformed code
MIT