Skip to content

ANSI escape codes library written in TypeScript for Deno.

License

Notifications You must be signed in to change notification settings

TypeScriptPlayground/ANSI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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();

About

ANSI escape codes library written in TypeScript for Deno.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published