@vbarbarosh/node-helpers 3.19.0 → 3.19.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/fastdl.js +3 -2
package/package.json
CHANGED
package/src/fastdl.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
const format_bytes = require('./format_bytes');
|
|
2
|
+
const format_percents = require('./format_percents');
|
|
2
3
|
const format_seconds = require('./format_seconds');
|
|
3
4
|
const format_thousands = require('./format_thousands');
|
|
4
5
|
const fs = require('fs');
|
|
@@ -42,10 +43,10 @@ async function fastdl({file, read_stream_with_range, concurrency = 60, user_frie
|
|
|
42
43
|
const bb = format_bytes;
|
|
43
44
|
const ss = format_seconds;
|
|
44
45
|
if (p.rate) {
|
|
45
|
-
_(`${bb(p.done)} of ${bb(p.total)} [${(p.
|
|
46
|
+
_(`${bb(p.done)} of ${bb(p.total)} [${format_percents(p.percents)}] at ${bb(p.rate)}/s ETA ${ss(p.eta)} duration=${ss(p.duration)} connections=${connections}`);
|
|
46
47
|
}
|
|
47
48
|
else {
|
|
48
|
-
_(`${bb(p.done)} of ${bb(p.total)} [${(p.
|
|
49
|
+
_(`${bb(p.done)} of ${bb(p.total)} [${format_percents(p.percents)}] at ~ ETA ${ss(p.eta)} duration=${ss(p.duration)} connections=${connections}`);
|
|
49
50
|
}
|
|
50
51
|
}
|
|
51
52
|
|