Fixing a bug in index.js

Change-Id: I780911777af2ff3aada08f0abc12b0ff3c12c333
1 file changed
tree: 64cc662220350c4891174ed265ff713ebf94a9d0
  1. test/
  2. .eslintrc
  3. .gitignore
  4. .npmrc
  5. .nvmrc
  6. .nycrc
  7. CHANGELOG.md
  8. index.js
  9. LICENSE
  10. METADATA
  11. package.json
  12. README.md
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