README
Dooing
A simple progress bar for Node cli
Usage
- install
npm install dooing
- example
- give it total number and mark to step, and special mark when it end.
const config = {
total: 10,
mark: '•',
endMark: '^v^',
}
const doobar = new Dooing(config)
setInterval(() => {
doobar.step()
}, 500)
setTimeout(() => {
process.exit()
}, 6000)
- give it some words to progress
import Dooing from '../lib'
const config = {
words: 'JavaScript rocks',
endMark: '!',
}
const doobar = new Dooing(config)
setInterval(() => {
doobar.step()
}, 500)
setTimeout(() => {
process.exit()
}, 500 * config.words.length)
- demo
LICENSE
MIT