Huge news!Announcing our $20M Series A led by Andreessen Horowitz.Learn more
Socket
Socket
Log inDemoInstall

is-generator-function

Package Overview
Dependencies
2
Maintainers
1
Versions
12
Issues
File Explorer

Advanced tools

Install Socket

Protect your apps from supply chain attacks

Install

is-generator-function

Determine if a function is a native generator function.

    1.0.10latest
    GitHub
    npm

Version published
Maintainers
1
Weekly downloads
17,553,816
decreased by-1.88%

Weekly downloads

Changelog

Source

v1.0.10 - 2021-08-05

Commits

  • [Dev Deps] update eslint, auto-changelog, core-js, tape 63cd935
  • [Fix] use has-tostringtag to behave correctly in the presence of symbol shams 8c3fe76
  • [Dev Deps] unpin core-js v3 ebf2885

Readme

Source

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

Keywords

FAQs

Last updated on 06 Aug 2021

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.

Install
SocketSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc