cognizant
Version:
A simple cli with a mindfulness bell to remember to take a breath and perhaps give your eyes a rest from the screen.
11 lines (10 loc) • 364 B
JavaScript
;
const ProgressBar = require('progress');
module.exports = { showProgress };
function showProgress(ms) {
let bar = new ProgressBar(':bar :percent', { total: 100, width: 73, clear: true, incomplete: ' ', complete: '-' });
let timer = setInterval(() => {
bar.tick();
if (bar.complete) clearInterval(timer);
}, (ms / 100));
}