get downloads stats for target npm profile
npm install --save npm-profile-downloads
import npmProfileDownloads from 'npm-profile-downloads';
npmProfileDownloads('last-month', 'sindresorhus').then(res => {
console.log(res); // 307290898
});
Return a promise that resolves to downloads stats.
Required
Type: String
One of last-month
, last-week
or last-day
.
Required
Type: String
Valid npm username.
- npm-profile-downloads-cli — get downloads stats for target npm profile with cli
MIT © Vladimir Starkov