live-xxx
An easy-to-use module to create progress bars and animate text !
Install
npm i --save stylish-text
Usage
//Example Usageconst bar = //Change default parametersbardefaultfull = "="; //Default character when the bar is fullbardefaultempty = " "; //Default character when the bar isn't fullbardefaulttext = "{bar} [{perc}]"; //use {bar} for the bar {perc} to display the percentage and {length} for the length of the bar (More options may be added) //Example to animate chars//Format: stylish([Array with all the frames], callback, duration (use 0 for infinite), interval) => calls the callback at the provided interval and returns the text (string)bar //Format: setInterval(interval between updates, how much is added each time, length of the bar, callback) => calls the callback at the provided interval and returns the bar (string)bar //Format: progress(Bar length, How much chars are full) => returns the bar (string)bar