progressbar
v1.3.0
Published
A nice wrapper around [TJ Holowaychuck's](https://github.com/visionmedia) [node-progress](https://github.com/visionmedia/node-progress) with chaining, domains, and steps
Downloads
2,105
Maintainers
Readme
A nice wrapper around TJ Holowaychuck's node-progress with chaining, domains, and steps
NPM
Usage
Example
const progress = require('progressbar').create().step('the task you are currently performing')
// use an array of steps that execute one second after each other
// as if we do them all instantly
// you won't see the progress bar as it will be instant
;[
() => progress.setTotal(5),
() => progress.setTick(1),
() => progress.setTick(2),
() => progress.setTick(3),
() => progress.addTick(),
() => progress.addTick(),
() => progress.finish() // remove and destroy the progress bar
].forEach(function (step, index) {
setTimeout(step, index * 1000)
})
ProgressBar API
step(step)
- set the step, resets the total and the ticksetTick(ticks)
- set the completed ticksaddTick()
- add 1 to the completed ticksgetTick()
- get the completed tickssetTotal(total)
- set the total ticksaddTotal()
- add 1 to the total ticksgetTotal()
- get the total ticksfinish()
- finish manually, will destroy the progress bar
Discover the release history by heading on over to the HISTORY.md file.
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
These amazing people are maintaining this project:
No sponsors yet! Will you be the first?
These amazing people have contributed code to this project:
Discover how you can contribute by heading on over to the CONTRIBUTING.md file.
Unless stated otherwise all works are:
and licensed under: