Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nhz-io/dprs
Dependency Resolver
https://github.com/nhz-io/dprs
Last synced: 3 days ago
JSON representation
Dependency Resolver
- Host: GitHub
- URL: https://github.com/nhz-io/dprs
- Owner: nhz-io
- License: mit
- Created: 2017-08-22T01:27:13.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-08-22T05:10:50.000Z (over 7 years ago)
- Last Synced: 2024-12-20T02:35:33.099Z (5 days ago)
- Language: JavaScript
- Homepage:
- Size: 87.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dprs
Dependency Resolver
## Install
```bash
npm i -S dprs
```## Usage
> Circular dependencies will never get resolved
```javascript
const DependencyResolver = require('dprs')const dprs = new DependencyResolver()
dprs.add('foobar', ['foo', 'bar'])
dprs.add('barfoo', ['foo', 'bar'])
dprs.add('foo', ['bar'])dprs.resolve('foobar') // -> false
dprs.resolve('barfoo') // -> false
dprs.resolve('foo') // -> falsedprs.resolve('bar') // -> true
dprs.resolve('foobar') // -> false
dprs.resolve('barfoo') // -> falsedprs.resolve('foo') // -> true
dprs.resolve('foobar') // -> true
dprs.resolve('barfoo') // -> true
```## Dev
```sh
git clone https://github.com/nhz-io/dprs
cd dprs
npm i
npm start
```### Coverage
```sh
npm run coverage
npm run report
```## License
### [MIT](LICENSE)
## Version 1.0.3