A simple progress bar generator using Fira Code Font unicode characters
npm install @bnmkt/progress
npm i -D @bnmkt/progressbar
`
Usage
$3
`typescript
import {progress} from "@bkt/progress"
const clearLastLine = () => {
process.stdout.clearLine()
process.stdout.cursorTo(0)
}
// Using the progress bar
progress.setValue(0) // Set the default value
.setMax(1000) // Set Maximum value
.setSize(15) // Size in character
const interval = setInterval(() => {
clearLastLine()
const max = progress.getMax()
const current = progress.getValue()
if(current >= max){
clearInterval(interval)
process.stdout.write(${progress.show()}\nProgressBar finished\n)
process.exit()
}
process.stdout.write(${progress.show()} ${current}/${max})
progress.add(50)
}, 100)
`
$3
`ts
import {progress} from "@bkt/progress"
// Simulating a progress bar
progress.simulate()
``