VERSION:0.4.0
Published 5 months ago by @ideas
ideas/
npm-dependants

npm-dependants

Get dependants of a module on npm.

Usage

Use the JavaScript API:

const dependants = require('npm-dependants')

for await (const dependant of dependants('express')) {
  console.log(dependant)
  // webpack-dev-server
  // webpack-bundle-analyzer
  // ...
}

Use the CLI:

$ npx npm-dependants express
webpack-dev-server
webpack-bundle-analyzer
# ...

Use as an Op:

$ npm install -g @cto.ai/ops && ops account:signup
$ ops run @juliangruber/npm-dependants brace-expansion

Installation

$ npm install npm-dependants

Implementation

Since there is no reliable api for querying dependant packages currently, this module scrapes npmjs.com - at the risk of npm changing their DOM. If you notice anything breaking, please open an issue 🙇‍♂️.

Sponsors

This project is sponsored by CTO.ai, making it easy for development teams to create and share workflow automations without leaving the command line.