unicode-progress

Progress bar text in unicode

Downloads in past

Stats

StarsIssuesVersionUpdatedCreatedSize
unicode-progress
101.0.06 years ago6 years agoMinified + gzip package size for unicode-progress in KB

Readme

A simple unicode progress-bar generator. Un-opinionated about how to display that bar. But log-update is a good choice!
Usage
Make a progress tracker:
var unicodeProgress = require('unicode-progress');

var progress = unicodeProgress({
  min: 0,       // minimum value (default 0)
  max: 200,     // maximum value (default 100)
  width: 100,   // width in characters (default 80)
});

Then generate the resulting progress bar:
let p = progress();
for (let i = 0; i < 200; i++) {
  process.stdout.write(`${p(i)}\r`);
}