dprs
v1.0.3
Published
Dependency Resolver
Downloads
5
Maintainers
Readme
dprs
Install
npm i -S dprs
Usage
Circular dependencies will never get resolved
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') // -> false
dprs.resolve('bar') // -> true
dprs.resolve('foobar') // -> false
dprs.resolve('barfoo') // -> false
dprs.resolve('foo') // -> true
dprs.resolve('foobar') // -> true
dprs.resolve('barfoo') // -> true
Dev
git clone https://github.com/nhz-io/dprs
cd dprs
npm i
npm start
Coverage
npm run coverage
npm run report