Wondering what’s next for npm?Check out our public roadmap! »

is-generator-function

1.0.8 • Public • Published

is-generator-function Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

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

Install

npm i is-generator-function

DownloadsWeekly Downloads

1,507,235

Version

1.0.8

License

MIT

Unpacked Size

36.2 kB

Total Files

19

Last publish

Collaborators

  • avatar