Gathering detailed insights and metrics for @adouming/request-progress
Gathering detailed insights and metrics for @adouming/request-progress
Gathering detailed insights and metrics for @adouming/request-progress
Gathering detailed insights and metrics for @adouming/request-progress
Tracks the download progress of a request made with mikeal/request
npm install @adouming/request-progress
Typescript
Module System
Node Version
NPM Version
71.8
Supply Chain
91.8
Quality
75.3
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
908
Last Day
1
Last Week
2
Last Month
20
Last Year
323
MIT License
217 Stars
85 Commits
19 Forks
6 Watchers
19 Branches
10 Contributors
Updated on Jan 30, 2025
Minified
Minified + Gzipped
Latest Version
3.0.1
Package Id
@adouming/request-progress@3.0.1
Unpacked Size
23.30 kB
Size
5.35 kB
File Count
8
NPM Version
8.3.2
Node Version
16.13.2
Cumulative downloads
Total Downloads
Last Day
0%
1
Compared to previous day
Last Week
-50%
2
Compared to previous week
Last Month
-41.2%
20
Compared to previous month
Last Year
51.6%
323
Compared to previous year
1
Tracks the download progress of a request made with request, giving insight of various metrics including progress percentage, download speed and time remaining.
$ npm install request-progress
1var fs = require('fs'); 2var request = require('request'); 3var progress = require('request-progress'); 4 5// The options argument is optional so you can omit it 6progress(request('https://az412801.vo.msecnd.net/vhd/VMBuild_20141027/VirtualBox/IE11/Windows/IE11.Win8.1.For.Windows.VirtualBox.zip'), { 7 // throttle: 2000, // Throttle the progress event to 2000ms, defaults to 1000ms 8 // delay: 1000, // Only start to emit after 1000ms delay, defaults to 0ms 9 // lengthHeader: 'x-transfer-length' // Length header to use, defaults to content-length 10}) 11.on('progress', function (state) { 12 // The state is an object that looks like this: 13 // { 14 // percent: 0.5, // Overall percent (between 0 to 1) 15 // speed: 554732, // The download speed in bytes/sec 16 // size: { 17 // total: 90044871, // The total payload size in bytes 18 // transferred: 27610959 // The transferred payload size in bytes 19 // }, 20 // time: { 21 // elapsed: 36.235, // The total elapsed seconds since the start (3 decimals) 22 // remaining: 81.403 // The remaining seconds to finish (3 decimals) 23 // } 24 // } 25 console.log('progress', state); 26}) 27.on('error', function (err) { 28 // Do something with err 29}) 30.on('end', function () { 31 // Do something after request finishes 32}) 33.pipe(fs.createWriteStream('IE11.Win8.1.For.Windows.VirtualBox.zip'));
If the request's response does not include the content-length
header, the values of some metrics will be null
.
Also speed
and time.remaining
will be null
until it can be calculated.
The state
object emitted in the progress
event is reused to avoid creating a new object for each event.
If you wish to peek the state
object at any time, it is available in request.progressState
.
$ npm test
$ npm test-cov
to get coverage report
Released under the MIT License.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 5/29 approved changesets -- score normalized to 1
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
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2025-05-19
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