Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jopemachine/get-npm-downloads
Display npm download in console (also include lib)
https://github.com/jopemachine/get-npm-downloads
cli download-counts npm npm-downloads
Last synced: 20 days ago
JSON representation
Display npm download in console (also include lib)
- Host: GitHub
- URL: https://github.com/jopemachine/get-npm-downloads
- Owner: jopemachine
- License: mit
- Created: 2021-03-14T08:58:20.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-05-17T00:16:24.000Z (over 2 years ago)
- Last Synced: 2024-11-09T09:54:11.330Z (3 months ago)
- Topics: cli, download-counts, npm, npm-downloads
- Language: JavaScript
- Homepage:
- Size: 214 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# get-npm-downloads
[![BuildStatus](https://api.travis-ci.com/jopemachine/get-npm-downloads.svg)](https://www.npmjs.com/package/get-npm-downloads)
[![NPM download total](https://img.shields.io/npm/dt/get-npm-downloads)](http://badge.fury.io/js/get-npm-downloads)
[![NPM version](https://badge.fury.io/js/get-npm-downloads.svg)](http://badge.fury.io/js/get-npm-downloads)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://lbesson.mit-license.org/)Display npm download in console (also include lib)
![](./demo.png)
## Usage
```js
const getNpmDownloads = require('get-npm-downloads');const datas = getNpmDownloads({
userId,
repo,
period: 'total'
});
```## Usage-cli
```
Usage
$ get-npm-downloads [repository_name || #user_name] period_optionExamples
$ get-npm-downloads repository_name today
$ get-npm-downloads repository_name last-day
$ get-npm-downloads repository_name day
$ get-npm-downloads repository_name last-week
$ get-npm-downloads '#user_name' w
$ get-npm-downloads '#user_name' last-month
$ get-npm-downloads '#user_name' 2014-01-01:2014-01-31
$ get-npm-downloads '#user_name' w
$ get-npm-downloads '#user_name' t
```