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