make-generator-function

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

MIT 5 个版本
安装
npm install make-generator-function
yarn add make-generator-function
pnpm add make-generator-function
bun add make-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

版本列表
2.1.0 2025-09-30
2.0.0 2020-01-28
1.1.1 2020-01-27
1.1.0 2015-03-03
1.0.0 2014-12-15