eider.js
is a simple CLI-progress bar for Node.
Inspired by Symfony Progress Bar (https://symfony.com/doc/current/components/console/helpers/progressbar.html)
npm install eider.js --save
git clone https://github.com/Treast/eider.js.git
mv ./eider.js/lib/eider.js ./foo/bar
const Eider = require('eider');
const Eider = require('../lib/eider');
// new Eider(progressBarSteps, progressBarLength, progressBarOptions)
let eider = new Eider(50, 40);
setInterval(() => {
eider.advance();
}, 300);
eider.start();
Name | Type | Default | Description |
---|---|---|---|
startChar | char |
[ |
First character of the progress bar |
endChar | char |
] |
Last character of the progress bar |
doneChar | char |
# |
Character displayed when the step is done |
currentChar | char |
> |
Character displayed when the step is currently doing |
undoneChar | char |
- |
Character displayed when the step is undone |
count | boolean |
true |
Display the step count |
percentage | boolean |
true |
Display the percentage |
Methods | Description |
---|---|
start() |
Start the progress bar |
stop() |
Stop the progress bar |
advance(n) |
Increment the progress bar by n steps |