@vbarbarosh/node-helpers
Advanced tools
Comparing version 3.21.0 to 3.21.1
@@ -5,3 +5,3 @@ { | ||
"name": "@vbarbarosh/node-helpers", | ||
"version": "3.21.0", | ||
"version": "3.21.1", | ||
"description": "A set of helpers for JavaScript/Node.js", | ||
@@ -8,0 +8,0 @@ "files": [ |
@@ -7,8 +7,10 @@ const format_bytes = require('./format_bytes'); | ||
{ | ||
const bps = rate ? `${format_bytes(rate)}/s` : '~'; | ||
if (total) { | ||
return `${format_percents(percents)} | ${format_bytes(done)} of ${format_bytes(total)} at ${format_bytes(rate)}/s ETA ${format_seconds(eta)} duration=${format_seconds(duration)}`; | ||
const eta_str = eta ? format_seconds(eta) : '~'; | ||
return `${format_percents(percents)} | ${format_bytes(done)} of ${format_bytes(total)} at ${bps} ETA ${eta_str} duration=${format_seconds(duration)}`; | ||
} | ||
return `${format_bytes(done)} of ~ at ${format_bytes(rate)}/s duration=${format_seconds(duration)}`; | ||
return `${format_bytes(done)} of ~ at ${bps} duration=${format_seconds(duration)}`; | ||
} | ||
module.exports = format_progress; |
106716
3078