Giter Site home page Giter Site logo

depnames's Introduction

depnames

Fetch a list of dependency names for a given npm package

Uses fetch-nice-package and nice-package under the hood.

Installation

Node 8 or greater is required because this module uses async functions.

npm i -g depnames

Module Usage

This module exports a single function which expects a package name and returns a promise. The resolved value is an array of package name strings:

require('depnames')('cheerio')
  .then(names => console.log(names))

To fetch dev dependencies, set the dev option:

require('depnames')('cheerio', {dev: true})
  .then(names => console.log(names))

If you need more flexibility, see fetch-nice-package and nice-package.

CLI Usage

The CLI prints a newline-delimited list to standard out:

depnames budo

bole
browserify
chokidar
connect-pushstate
escape-html
...

This newline pattern plays nicely with tools like the ghub CLI.

The following command will open every dependency's repository page in a browser tab:

npm i -g ghub depnames
depnames express | ghub

Pass the --dev flag to list devDependencies:

depnames budo --dev

2d-context
babel-preset-es2015
babelify
brfs
canvas-loop
...

Tests

npm install
npm test

Dependencies

Dev Dependencies

  • chai: BDD/TDD assertion library for node.js and the browser. Test framework agnostic.
  • mocha: simple, flexible, fun test framework
  • nixt: Simple and powerful testing for command-line apps
  • standard: JavaScript Standard Style
  • standard-markdown: Test your Markdown files for Standard JavaScript Style™

License

MIT

depnames's People

Contributors

zeke avatar

Stargazers

Andrew Mason avatar flumpus avatar  avatar  avatar Nate Goldman avatar Haroldo de Oliveira Pinheiro avatar

Watchers

Hemanth HM avatar James Cloos avatar Kiko Beats avatar Ionică Bizău (Johnny B.) avatar

Forkers

wooodhead

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.