simp-bar
Version:
use cli-progress module simpler
55 lines (41 loc) • 861 B
Markdown
# simp-bar
Simple Progress Bar for module 'cli-progress'
## Installing
```bash
$ npm i simp-bar
```
## Methods
- constructor(max: number, current?: number, options?: [Object](#options))
- make a bar
- set(current: number)
- set current value
- increment()
- increase value 1
- stop()
## Example
```javascript
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