@acegoal07/progressbar-builder
v1.0.6
Published
A simple progress bar builder
Downloads
19
Maintainers
Readme
To install use:
npm i @acegoal07/progressbar-builder
const { TimestampToProgress } = require("@acegoal07/progressbar-builder");
const bar = new TimestampToProgress()
.setDuration("01:58") // Required option - supports hour timestamps
.setPosition("01:00") // Required option - supports hour timestamps
.setSize(10) // Optional - Allows you to adjust how large the bar is
.setLine("*") // Optional - Allows you to set a custom character for the line
.setSlider("#") // Optional - Allows you to set a custom character for the slider
.enableHideInfo() // Optional - Hide progress info and only shows the bar
.enablePercentageInfo() // Optional - Replaces the progress info with a percentage of completion
.build(); // Required to create bar
console.log(bar);
const { ProgressBar } = require("@acegoal07/progressbar-builder");
const bar = new ProgressBar()
.setEnd(10) // Required option
.setPosition(4) // Required option
.setSize(10) // Optional Allows you to adjust how large the bar is
.setLine("*") // Optional - Allows you to set a custom character for the line
.setSlider("#") // Optional - Allows you to set a custom character for the slider
.enableHideInfo() // Optional - Hide progress info and only shows the bar
.enablePercentageInfo() // Optional - Replaces the progress info with a percentage of completion
.build(); // Required to create bar
console.log(bar);