Skip to main content
Deno 2 is finally here 🎉️
Learn more

bar

Create bar with deno

Use

import { textAnimation } from "https://deno.land/x/bar/mod.ts";
const _ta = new textAnimation();

Counter

Only counter

count 1-10 | interval : 100ms

await _ta.count(10, 100);

Counter + Text

count 1-10 | interval : 100ms | Text: Hello World

await _ta.count(10, 100, "Hello World");

Bar

Simple bar:

count 1-10 | interval : 100ms

await _ta.bar(10, 100);

Bar + text

count 1-10 | interval : 100ms | Text: Love you

_ta.barWithListener(10, "bar", "Love you");

Bar dynamic

This bar is a progess bar where your can call the “next” step yourself. This bar support Pre-text integration
count: 10 | barName | Text

_ta.barWithListener(10, "bar", "Love you");

DO NOT USE AWAIT FOR THIS BAR !

Ok so at this step we have a 10 sections empty bar, now we wanna enable next point:

_ta.next("bar")
[.. Do something instresting]
_ta.next("bar")
[..]

AND NOW 10 is to much and you need to end this bar, use:

_ta.forceEnd("bar");

Thanks

Alice :3