npm-api plugin for getting module dependents.
Install with npm:
$ npm install --save npm-api-dependents
Install with yarn:
$ yarn add npm-api-dependents
var npm = require('npm-api')();
var dependents = require('npm-api-dependents');
npm.use(dependents());
var repo = npm.repo('micromatch');
// returns a readable stream
repo.dependents()
.on('data', function(repo) {
console.log(repo);
});
Get the dependents for the current repo.
Params
options
{Object}: Options to handle returned resultsoptions.raw
{Boolean}: Optional. Set totrue
to receive objects of the form{ name: 'module' }
instead of Repo objects.returns
{Stream}: Returns a readable stream (object mode).
Example
var repo = npm.repo('micromatch');
// returns a readable stream
repo.dependents()
.on('data', function(repo) {
console.log(repo);
});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Commits | Contributor |
---|---|
6 | doowb |
1 | ralphtheninja |
(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.