node-progress icon indicating copy to clipboard operation
node-progress copied to clipboard

Expose elapsed (and other tokens) on progressbar object

Open AncientSwordRage opened this issue 4 years ago • 0 comments

Currently the way tokens work is via local variables that are put into the string directly.

Would it be possible to expose :elapsed and some other tokens on progressbar, mainly so I can do the following:

const progressBar = new ProgressBar({callback: console.log("Competed in " + this.elapsed + " seconds")})

Or whatever the equivalent would be?

If this is already possible, could the readme/examples be updated to show how?

AncientSwordRage avatar Jul 11 '21 11:07 AncientSwordRage