A cli progress-bar with the power of imagination π ( and emoji's π»)
const EmojiBar = require('emoji-progress');
const progress = new EmojiBar({
start: 10,
end: 100,
unit: 'π'
});
progress.start();
setTimeout(() => {
progress.increase(40);
setTimeout(() => {
progress.increase(70);
}, 3000);
}, 3000);
const EmojiBar = require('emoji-progress');
const loader = new EmojiBar({
hideState: true,
isLoader: true,
autostart: true
});
setTimeout(() => {
loader.complete();
}, 3000);
Defines the value at wich the progress bar starts.
startValue: 10
Default: 10
Defines the value at wich the progress bar end.
endValue: 150
Default: 100
The Emojibar will now be a infiniteloader.
endValue: true
Default: false
The state (0 of 100 unit) will be hidden.
hideState: true
Default: false
The bar will start on initialisation.
autostart: true
Default: false
Sets the direction to right to left.
reverse: true
Default: false
Sets the indicator.
indicator: 'π€©'
Default: 'β€οΈ'
Sets the unit (10 of 100 π).
unit: 'Steps'
Default: 'π'
Sets the separator (| 10 of 100).
separator: '||'
Default: '|'
Sets the padding. This can be used if you the loader uses more than one line.
paddingRight: 5
Default: 0
Sets the padding. This can be used if you the loader uses more than one line.
paddingRight: '||'
Default: '|'
Sets the filler at the left of the indicator.
fillerLeft: '#'
Default: '-'
Sets the filler at the left of the indicator.
fillerRight: '-'
Default: ' '
Sets the interval time. This is the refresh rate of the progress bar and the interval of the loader
intervalTime: '1000'
Default: 200
const progress = new EmojiBar({
start: 10,
end: 100,
unit: 'π',
paddingRight: 1,
fillerLeft: '-',
indicator: 'π->'
});
progress.start();
setTimeout(() => {
progress.increase(40);
setTimeout(() => {
progress.increase(70);
}, 3000);
}, 3000);
const loader = new EmojiBar({
hideState: true,
indicator: 'π',
reverse: true,
fillerLeft: 'π',
isLoader: true,
autostart: true,
intervalTime: 100,
});
const progress = new EmojiBar({
start: 10,
end: 100,
unit: 'π',
fillerRight: 'π ',
fillerLeft: ' ',
indicator: 'π¦ π
',
isLoader: true,
autostart: true,
reverse: true
});
progress.start();
setTimeout(() => {
progress.increase(40);
setTimeout(() => {
progress.increase(70);
}, 10000);
}, 3000);