Nectar of the Programming Masses

    is-generator-function
    DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/is-generator-function package

    1.0.10 • Public • Published

    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

    Install

    npm i is-generator-function

    DownloadsWeekly Downloads

    3,040,779

    Version

    1.0.10

    License

    MIT

    Unpacked Size

    31.9 kB

    Total Files

    12

    Last publish

    Collaborators

    • ljharb