Get the list of npm modules that depend on any other npm module.
Install with npm:
$ npm install --save module-dependents
Install with yarn:
$ yarn add module-dependents
var moduleDependents = require('module-dependents');
Get the list of npm modules that depend on any other npm module.
Params
name
{String}: Name of module to retrieve dependents for.options
{Object}: Options to pass along to npm-api-dependentsoptions.raw
{Function}: Optionally specify to get a raw object with aname
property for each dependent.returns
{Stream}: Returns an object stream with each object being an instance ofRepo
from the npm-api module.
Example
// returns a stream
moduleDependents('micromatch')
.on('data', function(dependent) {
console.log(dependent.name);
});
- npm-api-dependents: npm-api plugin for getting module dependents. | homepage
- npm-api: Base class for retrieving data from the npm registry. | homepage
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)
To generate the readme, run the following command:
$ npm install -g verbose/verb#dev verb-generate-readme && verb
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
$ npm install && npm test
Brian Woodward
Copyright © 2017, Brian Woodward. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on December 27, 2017.