Gathering detailed insights and metrics for download-stats
Gathering detailed insights and metrics for download-stats
Gathering detailed insights and metrics for download-stats
Gathering detailed insights and metrics for download-stats
get-download-stats
Pipeline plugin for getting download stats.
pkg-stats
Beautiful NPM package download stats
npm-stats-info
This is an npm package to interact with the npm api and npm registry. You can search for npm packages, get details, statistics or downlaod counts of any npm package.
term-stats
check npm download stats in your terminal :computer: :100:
npm install download-stats
Typescript
Module System
Min. Node Version
Node Version
NPM Version
JavaScript (100%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
28 Stars
51 Commits
4 Forks
4 Watchers
1 Branches
3 Contributors
Updated on Dec 24, 2024
Latest Version
0.3.4
Package Id
download-stats@0.3.4
Size
6.58 kB
NPM Version
5.3.0
Node Version
8.4.0
Published on
Mar 06, 2018
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
3
2
Get and calculate npm download stats for npm modules.
(TOC generated by verb using markdown-toc)
Install with npm:
1$ npm install --save download-stats
1var stats = require('download-stats');
Get a range of download counts for the specified repository. This method returns a stream of raw data in the form of { day: '2016-01-10', downloads: 123456 }
.
Example
1var start = new Date('2016-01-09'); 2var end = new Date('2016-01-10'); 3stats.get(start, end, 'micromatch') 4 .on('error', console.error) 5 .on('data', function(data) { 6 console.log(data); 7 }) 8 .on('end', function() { 9 console.log('done.'); 10 }); 11// { day: '2016-01-09', downloads: 53331 } 12// { day: '2016-01-10', downloads: 47341 }
Params
start
{Date}: Start date of stream.end
{Date}: End date of stream.repo
{String}: Repository to get downloads for. If repo
is not passed, then all npm downloads for the day will be returned.returns
{Stream}: Stream of download data.Calculate object containing methods to calculate stats on arrays of download counts. See [calculate][#calculate] api docs for more information.
Get a range of download counts for the specified repository. This method returns a stream of raw data in the form of { day: '2016-01-10', downloads: 123456 }
.
Example
1var start = new Date('2016-01-09'); 2var end = new Date('2016-01-10'); 3stats.get(start, end, 'micromatch') 4 .on('error', console.error) 5 .on('data', function(data) { 6 console.log(data); 7 }) 8 .on('end', function() { 9 console.log('done.'); 10 }); 11// { day: '2016-01-09', downloads: 53331 } 12// { day: '2016-01-10', downloads: 47341 }
Params
start
{Date}: Start date of stream.end
{Date}: End date of stream.repo
{String}: Repository to get downloads for. If repo
is not passed, then all npm downloads for the day will be returned.returns
{Stream}: Stream of download data.Get a specific point (all-time, last-month, last-week, last-day)
Example
1stats.get.period('last-day', 'micromatch', function(err, results) { 2 if (err) return console.error(err); 3 console.log(results); 4}); 5// { day: '2016-01-10', downloads: 47341 }
Params
period
{String}: Period to retrieve downloads for.repo
{String}: Repository to retrieve downloads for.cb
{Function}: Callback function to get resultsGet the all time total downloads for a repository.
Example
1stats.get.allTime('micromatch', function(err, results) { 2 if (err) return console.error(err); 3 console.log(results); 4}); 5// { day: '2016-01-10', downloads: 47341 }
Params
repo
{String}: Repository to retrieve downloads for.cb
{Function}: Callback function to get resultsGet the last month's total downloads for a repository.
Example
1stats.get.lastMonth('micromatch', function(err, results) { 2 if (err) return console.error(err); 3 console.log(results); 4}); 5// { downloads: 7750788, start: '2016-10-10', end: '2016-11-08', package: 'micromatch' }
Params
repo
{String}: Repository to retrieve downloads for.cb
{Function}: Callback function to get resultsGet the last week's total downloads for a repository.
Example
1stats.get.lastWeek('micromatch', function(err, results) { 2 if (err) return console.error(err); 3 console.log(results); 4}); 5// { downloads: 1777065, start: '2016-11-02', end: '2016-11-08', package: 'micromatch' }
Params
repo
{String}: Repository to retrieve downloads for.cb
{Function}: Callback function to get resultsGet the last day's total downloads for a repository.
Example
1stats.get.lastDay('micromatch', function(err, results) { 2 if (err) return console.error(err); 3 console.log(results); 4}); 5// { downloads: 316004, start: '2016-11-08', end: '2016-11-08', package: 'micromatch' }
Params
repo
{String}: Repository to retrieve downloads for.cb
{Function}: Callback function to get resultsGroup array into object where keys are groups and values are arrays. Groups determined by provided fn
.
Example
1var groups = calculate.group(downloads, function(download) { 2 // day is formatted as '2010-12-25' 3 // add this download to the '2010-12' group 4 return download.day.substr(0, 7); 5});
Params
arr
{Array}: Array of download objectsfn
{Function}: Function to determine group the download belongs in.returns
{String}: Key to use for the groupCalculate the total for each group (key) in the object.
Params
groups
{Object}: Object created by a group
function.returns
{Object}: Object with calculated totalsCalculate the total downloads for an array of download objects.
Params
arr
{Array}: Array of download objects (must have a .downloads
property)returns
{Number}: Total of all downloads in the array.Calculate the average for each group (key) in the object.
Params
groups
{Object}: Object created by a group
function.returns
{Object}: Object with calculated averageCalculate the average downloads for an array of download objects.
Params
arr
{Array}: Array of download objects (must have a .downloads
property)returns
{Number}: Average of all downloads in the array.Create an array of downloads before specified day.
Params
day
{String}: Day specifying last day to use in group.arr
{Array}: Array of downloads to check.returns
{Array}: Array of downloads happened before or on specified day.Calculate the total downloads happening before the specified day.
Params
day
{String}: Day specifying last day to use in group.arr
{Array}: Array of downloads to check.returns
{Number}: Total downloads happening before or on specified day.Create an array of downloads for the last X
days.
Params
days
{Number}: Number of days to go back.arr
{Array}: Array of downloads to check.init
{String}: Optional day to use as the last day to include. (Days from init || today
- days
to init || today
)returns
{Array}: Array of downloads for last X
days.Calculate total downloads for the last X
days.
Params
days
{Number}: Number of days to go back.arr
{Array}: Array of downloads to check.init
{String}: Optional day to use as the last day to include. (Days from init || today
- days
to init || today
)returns
{Array}: Array of downloads for last X
days.Create an array of downloads for the previous X
days.
Params
days
{Number}: Number of days to go back.arr
{Array}: Array of downloads to check.init
{String}: Optional day to use as the prev day to include. (Days from init || today
- days
- days
to init || today
- days
)returns
{Array}: Array of downloads for prev X
days.Calculate total downloads for the previous X
days.
Params
days
{Number}: Number of days to go back.arr
{Array}: Array of downloads to check.init
{String}: Optional day to use as the prev day to include. (Days from init || today
- days
- days
to init || today
- days
)returns
{Array}: Array of downloads for prev X
days.Create an object of download groups by month.
Params
arr
{Array}: Array of downloads to group and total.returns
{Object}: Groups with arrays of download objectsCalculate total downloads grouped by month.
Params
arr
{Array}: Array of downloads to group and total.returns
{Object}: Groups with total downloads calculatedCreate an object of download groups by month.
Params
arr
{Array}: Array of downloads to group and total.returns
{Object}: Groups with arrays of download objectsCalculate total downloads grouped by year.
Params
arr
{Array}: Array of downloads to group and total.returns
{Object}: Groups with total downloads calculatedPull requests and stars are always welcome. For bugs and feature requests, please create an issue.
(This document was generated by verb-generate-readme (a verb generator), please don't edit the readme directly. Any changes to the readme must be made in .verb.md.)
To generate the readme and API documentation with verb:
1$ npm install -g verb verb-generate-readme && verb
Install dev dependencies:
1$ npm install -d && npm test
Brian Woodward
Copyright © 2016, Brian Woodward. Released under the MIT license.
This file was generated by verb-generate-readme, v0.2.0, on November 09, 2016.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
Found 1/29 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
security policy file not detected
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More