npm.io
2.3.1 • Published 8 years ago

pkg-downloads

Licence
MIT
Version
2.3.1
Deps
1
Vulns
1
Weekly
0
Stars
2

pkg-downloads Build Status

Check total downloads of a package during a specific time period

Install

$ npm install pkg-downloads

Usage

const pkgDownloads = require('pkg-downloads');

pkgDownloads('chalk', {period: 'week'}).then(res => {
	console.log(res);
	//=> 2948939
});

API

pkgDownloads(name, options)
name

Required Type: string

Name of the npm package.

options
period

Required Type: string

Choose by day, week or month.

pkg-downloads-cli - CLI for this module.

License

MIT alonalon