Example program:
const ora = require('ora');
let count = 1;
const spinner = ora(`Line ${count}`);
spinner.start();
setInterval(() => {
count++;
spinner.text += `\nLine ${count}`;
}, 50);
setTimeout(() => {
spinner.succeed();
process.exit();
}, 1000);
Resize console window to have only 8 lines (I'm using the default Terminal on Mac).
The last 8 lines seem good:
Line 14
Line 15
Line 16
Line 17
Line 18
Line 19
Line 20
mycomputer $
But when you scroll up to see all lines, they look like this:
mycomputer $ node index.js
â ¦ Line 1
Line 2
â § Line 1
Line 2
Line 3
â ‡ Line 1
Line 2
Line 3
Line 4
Line 5
â Ź Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
â ‹ Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
â ™ Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
â ą Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 11
âś” Line 1
Line 2
Line 3
Line 4
Line 5
Line 6
Line 7
Line 8
Line 9
Line 10
Line 11
Line 12
Line 13
Line 14
Line 15
Line 16
Line 17
Line 18
Line 19
Line 20
mycomputer $
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too