4.0.0 • Published 2 years ago

@seyioo/progressbar.js v4.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

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); // |--------------------|
4.0.0

2 years ago

3.5.0

2 years ago

3.0.0

2 years ago

2.0.0

2 years ago

1.0.0

2 years ago