tree: e36db172df0565bbaf767ce3d3ae1279dda5f1c7 [path history] [tgz]
  1. test/
  2. .eslintignore
  3. .eslintrc
  4. .nvmrc
  5. .nycrc
  6. CHANGELOG.md
  7. index.js
  8. LICENSE
  9. package.json
  10. README.md
node_modules/is-generator-function/README.md

is-generator-function Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

Is this a native generator function?

Example

var isGeneratorFunction = require('is-generator-function');
assert(!isGeneratorFunction(function () {}));
assert(!isGeneratorFunction(null));
assert(isGeneratorFunction(function* () { yield 42; return Infinity; }));

Tests

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