simp-bar

0.0.4 • Public • Published

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

Dependencies (1)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i simp-bar

    Weekly Downloads

    2

    Version

    0.0.4

    License

    MIT

    Unpacked Size

    3.36 kB

    Total Files

    4

    Last publish

    Collaborators

    • taeseong14