npm-api-dependents
v1.0.0
Published
npm-api plugin for getting module dependents.
Downloads
15
Maintainers
Readme
npm-api-dependents
npm-api plugin for getting module dependents.
Install
Install with npm:
$ npm install --save npm-api-dependents
Install with yarn:
$ yarn add npm-api-dependents
Usage
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);
});
API
.dependents
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);
});
About
Contributing
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Contributors
| Commits | Contributor |
| --- | --- |
| 6 | doowb |
| 1 | ralphtheninja |
Building docs
(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 tests
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
Author
Brian Woodward
License
Copyright © 2017, Brian Woodward. Released under the MIT License.
This file was generated by verb-generate-readme, v0.6.0, on December 27, 2017.