npm-monitor
Monitor the npm registry for changes. Returns an infinite lazy list. Includes a mock for testing.
The list will contain all of the items in the changes
feed, so not all of them are going to be npm package changes.
changes = require('npm-monitor').monitor();
changes
.filter(function(seq){
return seq.doc && seq.doc["dist-tags"] && seq.doc["dist-tags"].length
})
.map(function(seq){
return seq.doc;
})
.forEach(function(doc){
console.log(doc.name+" changed!");
})