generatorfunction

new GeneratorFunction ([arg1[, arg2[, ...argN]],] functionBody)

Usage no npm install needed!

<script type="module">
  import generatorfunction from 'https://cdn.skypack.dev/generatorfunction';
</script>

README

generatorfunction

In the same way that you'd do:

var f = new Function ([arg1[, arg2[, ...argN]],] functionBody)

You can do that with Generator Functions:

var GeneratorFunction = require('generatorfunction')
var g = new GeneratorFunction ([arg1[, arg2[, ...argN]],] functionBody)

Installation

npm install generatorfunction

License

MIT