Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/doowb/module-dependents
Get the list of npm modules that depend on the specified npm module.
https://github.com/doowb/module-dependents
api dependencies dependents javascript modules nodejs npm npm-api package registry streaming streams
Last synced: 15 days ago
JSON representation
Get the list of npm modules that depend on the specified npm module.
- Host: GitHub
- URL: https://github.com/doowb/module-dependents
- Owner: doowb
- License: mit
- Created: 2016-03-24T00:20:12.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-12-27T20:14:12.000Z (almost 7 years ago)
- Last Synced: 2024-10-04T15:31:41.584Z (about 1 month ago)
- Topics: api, dependencies, dependents, javascript, modules, nodejs, npm, npm-api, package, registry, streaming, streams
- Language: JavaScript
- Homepage: https://github.com/doowb
- Size: 18.6 KB
- Stars: 15
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# module-dependents [![NPM version](https://img.shields.io/npm/v/module-dependents.svg?style=flat)](https://www.npmjs.com/package/module-dependents) [![NPM monthly downloads](https://img.shields.io/npm/dm/module-dependents.svg?style=flat)](https://npmjs.org/package/module-dependents) [![NPM total downloads](https://img.shields.io/npm/dt/module-dependents.svg?style=flat)](https://npmjs.org/package/module-dependents) [![Linux Build Status](https://img.shields.io/travis/doowb/module-dependents.svg?style=flat&label=Travis)](https://travis-ci.org/doowb/module-dependents) [![Windows Build Status](https://img.shields.io/appveyor/ci/doowb/module-dependents.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/doowb/module-dependents)
> Get the list of npm modules that depend on any other npm module.
## Install
Install with [npm](https://www.npmjs.com/):
```sh
$ npm install --save module-dependents
```Install with [yarn](https://yarnpkg.com):
```sh
$ yarn add module-dependents
```## Usage
```js
var moduleDependents = require('module-dependents');
```## API
### [moduleDependents](index.js#L31)
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-dependents](https://github.com/doowb/npm-api-dependents)
* `options.raw` **{Function}**: Optionally specify to get a raw object with a `name` property for each dependent.
* `returns` **{Stream}**: Returns an object stream with each object being an instance of `Repo` from the [npm-api](https://github.com/doowb/npm-api) module.**Example**
```js
// returns a stream
moduleDependents('micromatch')
.on('data', function(dependent) {
console.log(dependent.name);
});
```## About
### Related projects
* [npm-api-dependents](https://www.npmjs.com/package/npm-api-dependents): npm-api plugin for getting module dependents. | [homepage](https://github.com/doowb/npm-api-dependents "npm-api plugin for getting module dependents.")
* [npm-api](https://www.npmjs.com/package/npm-api): Base class for retrieving data from the npm registry. | [homepage](https://github.com/doowb/npm-api "Base class for retrieving data from the npm registry.")### Contributing
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
### 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._