1.3.9 • Published 3 years ago
color-progress-bar v1.3.9
color-progress-bar
About
Node.js progress bar with color base progress package.
How use
npm
npm i color-progress-bar --saveyarn
yarn add color-progress-bar -Sexample
const ProgressBar = require('color-progress-bar');
const bar = new ColorProgressBar("downloading :bar :percent :etas", {
width: 50,
total: 100,
});
let i = 0;
const timer = setInterval(function () {
bar.tick();
i++;
if (i == 100) {
console.log("\ncomplete\n");
clearInterval(timer);
}
}, 50);Tpl args
These are keywords you can use in the format of your progress bar tpl.
:barthe progress bar itself:currentcurrent tick number:totaltotal ticks:elapsedtime elapsed in seconds:percentcompletion percentage:etaestimated completion time in seconds:raterate of ticks per second