npm.io
0.0.4 • Published 4 years ago

simp-bar

Licence
MIT
Version
0.0.4
Deps
1
Size
3 kB
Vulns
0
Weekly
0

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

Keywords