Package detail

make-generator-function

ljharb81.6kMIT2.1.0

Returns an arbitrary generator function, or undefined if generator syntax is unsupported.

generator function, ES6, generator, function*

readme

make-generator-function Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Returns an array of arbitrary generator functions, which will be empty if generator syntax is unsupported.

Example

var generatorFunctions = require('make-async-generator-function');
assert(typeof generatorFunctions === 'function');

var funcs = generatorFunctions();
assert(Array.isArray(funcs), true);

Tests

Simply clone the repo, npm install, and run npm test