Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doowb/npm-api-dependents
npm-api plugin for streaming an npm module's dependents information
https://github.com/doowb/npm-api-dependents
api dependents download-stats javascript modules nodejs npm npm-api repos streaming streams
Last synced: 15 days ago
JSON representation
npm-api plugin for streaming an npm module's dependents information
- Host: GitHub
- URL: https://github.com/doowb/npm-api-dependents
- Owner: doowb
- License: mit
- Created: 2016-03-23T21:29:47.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T19:18:21.000Z (almost 7 years ago)
- Last Synced: 2024-05-01T22:09:54.385Z (6 months ago)
- Topics: api, dependents, download-stats, javascript, modules, nodejs, npm, npm-api, repos, streaming, streams
- Language: JavaScript
- Homepage: https://github.com/doowb
- Size: 15.6 KB
- Stars: 9
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# npm-api-dependents [![NPM version](https://img.shields.io/npm/v/npm-api-dependents.svg?style=flat)](https://www.npmjs.com/package/npm-api-dependents) [![NPM monthly downloads](https://img.shields.io/npm/dm/npm-api-dependents.svg?style=flat)](https://npmjs.org/package/npm-api-dependents) [![NPM total downloads](https://img.shields.io/npm/dt/npm-api-dependents.svg?style=flat)](https://npmjs.org/package/npm-api-dependents) [![Linux Build Status](https://img.shields.io/travis/doowb/npm-api-dependents.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/npm-api-dependents) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/npm-api-dependents.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/npm-api-dependents)
> npm-api plugin for getting module dependents.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save npm-api-dependents
```Install with [yarn](https://yarnpkg.com):
```sh
$ yarn add npm-api-dependents
```## Usage
```js
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](index.js#L38)
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](https://github.com/doowb/npm-api#repo-1) objects.
* `returns` **{Stream}**: Returns a readable stream (object mode).**Example**
```js
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](../../issues/new).
### Contributors
| **Commits** | **Contributor** |
| --- | --- |
| 6 | [doowb](https://github.com/doowb) |
| 1 | [ralphtheninja](https://github.com/ralphtheninja) |### Building docs
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
To generate the readme, run the following command:
```sh
$ 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:
```sh
$ npm install && npm test
```### Author
**Brian Woodward**
* [github/doowb](https://github.com/doowb)
* [twitter/doowb](https://twitter.com/doowb)### License
Copyright © 2017, [Brian Woodward](https://github.com/doowb).
Released under the [MIT License](LICENSE).***
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on December 27, 2017._