is-generator-function
Advanced tools
Weekly downloads
Changelog
Readme
Is this a native generator function?
var isGeneratorFunction = require('is-generator-function');
assert(!isGeneratorFunction(function () {}));
assert(!isGeneratorFunction(null));
assert(isGeneratorFunction(function* () { yield 42; return Infinity; }));
Simply clone the repo, npm install
, and run npm test
FAQs
Determine if a function is a native generator function.
The npm package is-generator-function receives a total of 16,695,758 weekly downloads. As such, is-generator-function popularity was classified as popular.
We found that is-generator-function demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a GitHub app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.