Node's Pocket Monsters

    is-generator-fn
    TypeScript icon, indicating that this package has built-in type declarations

    3.0.0 • Public • Published

    is-generator-fn

    Check if something is a generator function

    Install

    $ npm install is-generator-fn
    

    Usage

    import isGeneratorFunction from 'is-generator-fn';
    
    isGeneratorFunction(function * () {});
    //=> true
    
    isGeneratorFunction(function () {});
    //=> false

    Related

    • is - Type check values

    Install

    npm i is-generator-fn

    DownloadsWeekly Downloads

    13,555,874

    Version

    3.0.0

    License

    MIT

    Unpacked Size

    2.92 kB

    Total Files

    5

    Last publish

    Collaborators

    • sindresorhus