0.0.4 • Published 2 years ago
simp-bar v0.0.4
simp-bar
Simple Progress Bar for module 'cli-progress'
Installing
$ npm i simp-bar
Methods
constructor(max: number, current?: number, options?: Object)
- make a bar
set(current: number)
- set current value
increment()
- increase value 1
stop()
Example
const Bar = require('simp-bar');
const bar = new Bar(100);
bar.set(50);
bar.increment();
bar.stop();
Options
format(string): Bar string format
- {bar}
- {percentage}
- {value}
- {total}
- {ETA}
- {speed}
presets(string): Bar style
- legacy
- rect
- shadow_classic
- shadow_gray
barCompleteChar(string)
barIncompleteChar(string)
stopOnComplete(boolean)
- default: true
hideCursor(boolean)
- default: false