npm-api-dependents

1.0.0 • Public • Published

npm-api-dependents NPM version NPM monthly downloads NPM total downloads Linux Build Status Windows Build Status

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 results
  • options.raw {Boolean}: Optional. Set to true 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.

Dependencies (3)

Dev Dependencies (3)

Package Sidebar

Install

npm i npm-api-dependents

Weekly Downloads

5

Version

1.0.0

License

MIT

Last publish

Collaborators

  • doowb