A console progress bar that is easy to use and understand.
###Constructor:
var progressbar = new ProgressBar(labelText, formatString, writeableStream);
-
labelText: string (Default: Progress) The value of the label next to the progress bar.
-
formatString: string (Default: :label :bar :percent) The string containing format elements to be replaced on update.
:label
replaced with the labelText value.:bar
replaced with the progress bar.:percent
replaced with the current progress percent.
-
writeableStream: obj (Default: stdout) The writable stream the progressbar will be written to.
###Example Usage:
var ProgressBar = require('simple-progrss-bar'),
pb;
globals.pubsub.on('event', (itemCount, totalItems) => {
pb = pb || new ProgressBar('Progress: ', ':label \t [ :bar ] :percent ');
pb.update(itemCount, totalItems);
});
###Methods:
update(itemCount, totalItems)
: updates the progress bar to the percent calculated by the itemCount divided by the totalItems value.
###Building:
grunt
This will build the package manually.
####Built with TypeScript.