Get dependants of a module on npm.
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
$ npm install npm-dependants
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 🙇♂️.
This project is sponsored by CTO.ai, making it easy for development teams to create and share workflow automations without leaving the command line.