Parses the shrinkwrap.json and returns the B+ tree of the dependencies.
npm install shrinkedParses the shrinkwrap.json and returns the B+ tree of the dependencies.
``js`
dependencies: {
}
},
asyncDependencies: ...,
devDependencies: ...
}
}
`bash`
$ npm install shrinked --save
`js`
var shrinked = require('shrinked');
- file path Absolute path of the xxx-shrinkwrap.jsonfunction(err, tree)
- callback Error
- err Object
- tree the B+ tree of dependencies which described above. Object
- options Array=['dependencies']
- dependencyKeys into which dependency key should shrinked decende down.
`jsshrinked
shrinked('cortex-shrinkwrap.json', {
dependencyKeys: [
'dependencies',
// Then will parse three more keys in addition.`
'asyncDependencies',
'devDependencies',
'engines'
]
}, function(err, tree){
if (err) {
return console.error(err);
}
console.log('The B+ tree is', util.inspect(tree, depth: 10));
});
- json Object the object of shrinkwrap.json
Returns tree`
MIT