package
Determine if a function is a native generator function.
npm install is-generator-functionGitHub-flavored package documentation.
Across all versions.
Download trend unavailable.
Runtime metadata.
Tagged topics.
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
Estimated unpacked size across 16 packages.
304.2 kB
Includes dependencies.
5 direct dependencies.
^1.0.1
1.0.1
^1.0.4
1.0.4
^1.0.2
1.0.2
^1.1.0
1.1.0
^2.0.0
2.0.1