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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v2.1.0 - 2025-09-30

Commits

  • [actions] reuse common workflows 81ab0fb
  • [Tests] migrate tests to Github Actions c7c2c59
  • [readme] fix examples; remove testling 9d394f2
  • [meta] use npmignore to autogenerate an npmignore file 705936b
  • [Tests] run nyc on all tests; use tape runner a49bd47
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape 8171f61
  • [readme] add actions and codecov badges e24b999
  • [Dev Deps] update eslint, @ljharb/eslint-config, safe-publish-latest, tape df5adc8
  • [meta] do not publish workflow files 76aaa64
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape, aud, auto-changelog d113c23
  • [Dev Deps] update eslint, @ljharb/eslint-config, auto-changelog, iterate-iterator, safe-publish-latest, tape 137e87e
  • [actions] update codecov uploader aad77cd
  • [actions] add Automatic Rebase and Require Allow Edits workflows 2795e85
  • [Dev Deps] update @ljharb/eslint-config, auto-changelog, for-each, npmignore, tape b9b3fc0
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape 1d4f786
  • [actions] update rebase action 08fb424
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, tape 86872bb
  • [Dev Deps] update auto-changelog, tape; add aud c5abe6e
  • [actions] update codecov uploader ac65104
  • [actions] update workflows b9feec2
  • [New] add a generator function declaration 44c5266
  • [Tests] replace aud with npm audit 999219a
  • [meta] use prepublishOnly script for npm 7+ 964b5e4
  • [meta] better eclint command 531f4b3
  • [Dev Deps] add missing peer dep 352ef85

v2.0.0 - 2020-01-27

Commits

  • [Breaking] export a function that returns a list of generator functions 71003b9

v1.1.1 - 2020-01-27

Fixed

  • [Docs] Add missing license #2

Commits

  • [Tests] use shared travis-ci configs 73dba5c
  • Update eslint, tape; use my personal shared eslint config b604ab4
  • Add npm run eslint 113d983
  • [Tests] remove jscs 4c9100c
  • [Tests] up to node v8.4, v7.10, v6.11, v4.8; newer npm breaks on older node; improve matrix 865d46f
  • [Tests] up to node v11.7, v10.15, v9.11, v8.15, v6.16, v4.9 c159ff4
  • [Dev Deps] update tape, jscs, eslint, @ljharb/eslint-config, nsp 06336cc
  • [meta] add auto-changelog 672196a
  • [Tests] up to node v12.10, v11.15, v10.16, v8.16, v6.17 97c87a3
  • Update tape, jscs, covert 55a82c3
  • [Tests] up to node v6.2, v5.11, v4.4 e8dd157
  • [Tests] up to node v9.3, v8.9, v6.12; use nvm install-latest-npm; pin included builds to LTS 6b9aeda
  • Update eslint, nsp acc5699
  • [Tests] up to node v7.0, v6.9, v4.6; improve test matrix 6050544
  • Update tape, jscs, eslint, @ljharb/eslint-config 3a74514
  • [actions] add automatic rebasing / merge commit blocking 2b0632e
  • Test up to io.js v2.2 7be5eaa
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape 89ca6b8
  • [Dev Deps] update eslint, @ljharb/eslint-config, tape; add safe-publish-latest 1085b97
  • [Dev Deps] update eslint, @ljharb/eslint-config, nsp, tape 31669dd
  • [Dev Deps] update tape, jscs, eslint, @ljharb/eslint-config, nsp 3e5632c
  • [Tests] up to io.js v3.3, node v4.1 ae10e71
  • [Dev Deps] update eslint, @ljharb/eslint-config, covert, tape 498a056
  • [Tests] use npm audit instead of nsp be8e5d2
  • Only apps should have lockfiles 2be2319
  • [Dev Deps] update jscs, eslint, @ljharb/eslint-config, nsp 54be59e
  • [Dev Deps] update jscs 5248429
  • [Tests] use npx aud instead of nsp or npm audit with hoops 3b01ae8
  • [Dev Deps] update eslint, @ljharb/eslint-config, nsp 94dc41a
  • [Dev Deps] update tape, eslint, @ljharb/eslint-config 5e371bf
  • [Tests] use pretest/posttest for linting/security; create tests-only script. d5794fa
  • [Tests] use eclint instead of editorconfig-tools eed2fad
  • [Dev Deps] update nsp, eslint 43665f5
  • [Tests] up to node v7.2 0386a7b
  • [Dev Deps] Update tape, eslint 5810537
  • Test on iojs-v1.5 and iojs-v1.6 9553cf1
  • Update editorconfig-tools, nsp 9c1584a
  • [meta] add funding field 293f453
  • node supports generators now. ace0d4b
  • Test up to io.jsv3.0[5b2df35`](https://github.com/ljharb/make-generator-function/commit/5b2df35a95c2bf60bad3b1ff1f44078e9bc0a072)
  • Removing unused devDependencies. f72daba
  • [Dev Deps] update tape c357966
  • Switch from vb.teelaun.ch to versionbadg.es for the npm version badge SVG. 7607415
  • Test on io.js v2.4 ca61c17
  • Test on io.js v2.3 5b029ba

v1.1.0 - 2015-03-03

Commits

  • Add a concise generator method. ea86f3d
  • All grade A-supported node/iojs versions now ship with an npm that understands ^. 62630da
  • Reorganizing tests. f77c0cd
  • Update is, tape, jscs, nsp 40c85a2
  • Run travis-ci tests on iojs and node v0.12; speed up builds; allow 0.8 failures. 2f20edc
  • Test on latest io.js 0eac7b6
  • Update tape, jscs dab3942
  • Update jscs f9cfafb
  • Don't run eccheck as part of tests yet. c8fe96d
  • Test on iojs-v1.2 b188157

v1.0.0 - 2014-12-14

Commits