Skip to content
get download stats during a time period for a npm package
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.editorconfig
.gitattributes
.gitignore
.npmrc
.travis.yml
index.js
license
package.json
readme.md
test.js

readme.md

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.

Related

pkg-downloads-cli - CLI for this module.

License

MIT © alonalon

You can’t perform that action at this time.