@memw/simpleprogressbar
v2.0.0
Published
A package that lets you create a progress bar and return it as string
Downloads
6
Maintainers
Readme
Simple progress bar
This package lets you make a progress bar, update it and get the string of it.
usage
this package is a simple constructor
you require the package and use it like this
const simpleProgressBar = require('@memw/simpleprogressbar');
to use it you need to create a new instance of the class.
const progressBar = new simpleProgressBar(style);
the argument style is the style of the progress bar it is a string, example: "=>" or "##"
methods
There are 5 simple methods you can use for this progress bar:
addProgress lets you sum to the value of the progress bar, it doesn't return anything
progressBar.addProgress(number);
removeProgress lets you remove from the value of the progress bar, it doesn't return anything
progressBar.removeProgress(number);
resetProgress lets you reset the value of the progress bar, it doesn't return anything
progressBar.resetProgress();
getProgress, it returns the integer of the progress itself
progressBar.getProgress();
getProgressBar, it returns the string of the progress bar
progressBar.getProgressBar();