Check total downloads of a package during a specific time period
$ npm install pkg-downloads
const pkgDownloads = require('pkg-downloads');
pkgDownloads('chalk', {period: 'week'}).then(res => {
console.log(res);
//=> 2948939
});
Required
Type: string
Name of the npm package.
Required
Type: string
Choose by day
, week
or month
.
pkg-downloads-cli - CLI for this module.
MIT © alonalon