0.3.6 • Published 10 years ago

simple-progress-bar v0.3.6

Weekly downloads
62
License
-
Repository
github
Last release
10 years ago

NPM

simple-progress-bar

A console progress bar that is easy to use and understand.

###Constructor: var progressbar = new ProgressBar(labelText, formatString, writeableStream);

  1. labelText: string (Default: Progress) The value of the label next to the progress bar.

  2. formatString: string (Default: :label :bar :percent) The string containing format elements to be replaced on update.

    1. :label replaced with the labelText value.
    2. :bar replaced with the progress bar.
    3. :percent replaced with the current progress percent.
  3. 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.

0.3.6

10 years ago

0.3.5

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.92

10 years ago

0.2.91

10 years ago

0.2.9

10 years ago

0.2.8

10 years ago

0.2.7

10 years ago

0.2.6

10 years ago

0.2.5

10 years ago