Skip to content

is-gen-fn is has invalid package.json in Node 16 #131

@shawncarr

Description

@shawncarr

The package is-gen-fn, which koa-joi-router has a dependency on, has an issue in its package.json resulting in a DeprecationWarning when koa-joi-router is used in node 16.

[DEP0128] DeprecationWarning: Invalid 'main' field in '/usr/src/app/node_modules/is-gen-fn/package.json' of 'yes'. Please either fix that or report it to the module author

As the is-gen-fn package has not been updated in 7 years nor is it public, and is a single line function I recommend that you implement the function in this package to avoid issues in the future.

Function from is-gen-fn

function isGeneratorFunction(obj) {
  return obj && obj.constructor && 'GeneratorFunction' == obj.constructor.name;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions