root 7621d6d22a 221005-1449-Kim 2 years ago
..
test 7621d6d22a 221005-1449-Kim 2 years ago
.eslintignore 7621d6d22a 221005-1449-Kim 2 years ago
.eslintrc 7621d6d22a 221005-1449-Kim 2 years ago
.nvmrc 7621d6d22a 221005-1449-Kim 2 years ago
.nycrc 7621d6d22a 221005-1449-Kim 2 years ago
CHANGELOG.md 7621d6d22a 221005-1449-Kim 2 years ago
LICENSE 7621d6d22a 221005-1449-Kim 2 years ago
README.md 7621d6d22a 221005-1449-Kim 2 years ago
index.js 7621d6d22a 221005-1449-Kim 2 years ago
package.json 7621d6d22a 221005-1449-Kim 2 years ago

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