Crawls npm to fetch the number of total, daily, weekly, and monthly packages.
'use strict';
var npmDownloads = require('npm-pkg-downloads');
npmDownloads(function(downloads) {
console.log(downloads);
});
Output
{ total: 90525, day: 16299502, week: 99896225, month: 413985488 }
npm install npm-pkg-downloads
npm test