https://github.com/deno-sandbox/bar
Create loading bar with DENO
https://github.com/deno-sandbox/bar
deno
Last synced: about 2 months ago
JSON representation
Create loading bar with DENO
- Host: GitHub
- URL: https://github.com/deno-sandbox/bar
- Owner: Deno-Sandbox
- License: gpl-3.0
- Created: 2022-02-13T08:59:52.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-02-13T09:14:21.000Z (over 4 years ago)
- Last Synced: 2025-03-17T20:56:25.015Z (over 1 year ago)
- Topics: deno
- Language: TypeScript
- Homepage: https://deno.land/x/bar
- Size: 15.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# bar
Create bar with deno
# Use
```ts
import { textAnimation } from "https://deno.land/x/bar/mod.ts";
const _ta = new textAnimation();
```
## Counter
### Only counter
count 1-10 | interval : 100ms
```ts
await _ta.count(10, 100);
```
### Counter + Text
count 1-10 | interval : 100ms | Text: Hello World
```ts
await _ta.count(10, 100, "Hello World");
```
## Bar
## Simple bar:
count 1-10 | interval : 100ms
```ts
await _ta.bar(10, 100);
```
## Bar + text
count 1-10 | interval : 100ms | Text: Love you
```ts
_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
```ts
_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:
```ts
_ta.next("bar")
[.. Do something instresting]
_ta.next("bar")
[..]
```
AND NOW 10 is to much and you need to end this bar, use:
```ts
_ta.forceEnd("bar");
```
# Thanks
Alice :3