Closed Brimstedt closed 3 years ago
ProgressBar instance cannot be reused. If you need more than one, you can create multiple instances.
const progress1 = new ProgressBar();
const progress2 = new ProgressBar();
If you have a good idea, welcome to submit a pull request.
@Brimstedt Can you send a screenshot of the problem? I'm not sure I understand
I did:
Note the
render(i)
will render 0 tototal - 1
. This caused the progress to stop at random intervals although all items were processed.I would have expected the last output to be "68 / 69" if total was 68. But it would say random numbers.
Changing to
progress.render(i+1)
caused the correct output.I realize my code was wrong, but I would have expected progress.end() or progress.console() to "flush" the progressbar.