@seyioo/progressbar.js

4.0.0 • Public • Published

ProgressBar.JS

An easy way to create terminal progress bar !

Summary

Requirements

Installation

To install the package, execute this command in the terminal:

npm install @seyioo/progressbar.js

Usage

Create a customizable progress bar !

Quick Start

You just have to import the functions as well:

// Import the functions
const ProgressBar = require('@seyioo/progressbar.js');

Example

// Import the functions
const ProgressBar = require('@seyioo/progressbar.js');

// Init your progress bar
const bar = new ProgressBar(
    3, // The number of stages.
    ['%', '-'] // [%%%%%%%%%%----------]
    ['|', '|'] // |%%%%%%%%%%----------|
);
// |--------------------|

bar.reload(); // |--------------------|
bar.next(); // |%%%%%%--------------|
bar.next(); // |%%%%%%%%%%%%%-------|
bar.next(); // |%%%%%%%%%%%%%%%%%%%%|
bar.next(); // |--------------------|
bar.previous(); // |%%%%%%%%%%%%%%%%%%%%|
bar.previous(); // |%%%%%%%%%%%%%-------|
bar.previous(); // |%%%%%%--------------|
bar.previous(); // |--------------------|
bar.previous(); // |%%%%%%%%%%%%%%%%%%%%|
bar.set(0); // |--------------------|
bar.set(4); // |%%%%%%--------------|
bar.set(7); // |%%%%%%--------------|
bar.set(-1); // |--------------------|
bar.set(-4); // |--------------------|

Readme

Keywords

none

Package Sidebar

Install

npm i @seyioo/progressbar.js

Weekly Downloads

0

Version

4.0.0

License

MIT

Unpacked Size

6.69 kB

Total Files

6

Last publish

Collaborators

  • seyioo