How to use npm-why - 1 common examples

To help you get started, we’ve selected a few npm-why examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github amio / nls / lib / index.js View on Github external
const args = mri(process.argv.slice(2), {
  boolean: ['help', 'version', 'why'],
  alias: {
    h: 'help',
    v: 'version',
    w: 'why'
  }
})

if (args.help) {
  console.info(help)
} else if (args.version) {
  console.info(require('../package.json').version)
} else if (args.why && args._.length === 1) {
  why(process.cwd(), args._[0])
} else {
  list()
}

npm-why

Identifies why a package has been installed.

MIT
Latest version published 2 years ago

Package Health Score

39 / 100
Full package analysis

Popular npm-why functions