nsp-audit-shrinkwrap
1.0.3 • Public • Published nsp-audit-shrinkwrap
nsp-audit-shrinkwrap
offers a simple library to audit your shrinkwrap or a stream of shrinkwraps.
Badgers
Single npm-shrinkwrap.json
var nspShrinkwrap = require('nsp-audit-shrinkwrap');
var shrinkwrapPath = '/path/to/npm-shrinkwrap.json'
var shrinkwrapFile = fs.readFileSync(shrinkwrapPath);
nspShrinkwrap.audit(shrinkwrapFile, function (err, results){
console.log(results);
};
nspShrinkwrap.auditByPath(shrinkwrapPath, function (err, results){
console.log(results);
};
Stream of npm-shrinkwrap.json
var auditStream = nspShrinkwrap.auditStream();
var results = [];
auditStream.shrinkwrap.write(shrinkwrap1);
auditStream.shrinkwrap.write(shrinkwrap2);
setTimeout(function(){
auditStream.shrinkwrap.end();
}, 3000);
auditStream.results.on('_data', function (data){
results.push(data);
});
auditStream.results.on('_end', function (){
console.log(results);
});
Versions
Version | Downloads (Last 7 Days) | Tag |
---|
1.0.3 | 2,643 | latest |
Version History
Version | Downloads (Last 7 Days) | Published |
---|
1.0.3 | 2,643 | |
1.0.2 | 0 | |
1.0.1 | 0 | |
1.0.0 | 0 | |
0.0.1 | 0 | |
Package Sidebar
Install
npm i nsp-audit-shrinkwrap
Weekly Downloads