progress-bar-formatter
Formats a progress bar
Example
var pbf = require ("progress-bar-formatter");
var progress = pbf.create ();
console.log (progress.format (0.4));
Functions
Objects
module.create([options]) : Formatter
Returns a new Formatter instance.
Options:
- complete - String
The character that shows completion progress. Default is #
. - incomplete - String
The character that shows the remaining progress. Default is ·
. - length - Number
The length of the progress bar. Default is 24
.
Formatter
Methods
Formatter#format(n) : String
Formats the progress bar. n
is a number between 0 and 1.