is-generator-function
Determine if a function is a native generator function.
Last updated 3 years ago by ljharb .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install is-generator-function 
SYNC missed versions from official npm registry.

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

Current Tags

  • 1.0.4                                ...           backport (8 years ago)
  • 1.0.10                                ...           latest (3 years ago)

11 Versions

  • 1.0.10                                ...           3 years ago
  • 1.0.9                                ...           4 years ago
  • 1.0.8                                ...           4 years ago
  • 1.0.7                                ...           7 years ago
  • 1.0.6                                ...           8 years ago
  • 1.0.4                                ...           8 years ago
  • 1.0.5 [deprecated]           ...           8 years ago
  • 1.0.3                                ...           10 years ago
  • 1.0.2                                ...           10 years ago
  • 1.0.1                                ...           10 years ago
  • 1.0.0                                ...           10 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (1)
Dev Dependencies (10)

Copyright 2013 - present © cnpmjs.org | Home |