Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 893 Bytes

README.md

File metadata and controls

26 lines (19 loc) · 893 Bytes

ANSI

ANSI escape codes library written in TypeScript for Deno.

Dots

Just perfekt!

console.log('⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇\n⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇\n⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇\n⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇\n⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇\n⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇⣿⣿⢸⣿⡇');

image

function animateSpinner() {
    const frames = ['⠋ ', '⠉⠁', '⠈⠃', ' ⠇', '⠠⠆', '⠤⠄', '⠦ ', '⠇ '];
    let i = 0;
  
    setInterval(() => {
        Deno.stdout.write(new TextEncoder().encode('\x9b38;5;110m\r' + frames[i] + 'Loading'));
        i = (i + 1) % frames.length;
    }, 80);
}

animateSpinner();