0.1.4 • Published 10 months ago

@zzkit/tqdm v0.1.4

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

@zzkit/tqdm

A progress bar library for showing progress of loops and asynchronous tasks in the terminal.

Install

npm install @zzkit/tqdm

Usage

Import and wrap your loops or async tasks with the tqdm function:

import { tqdm, range } from "@zzkit/tqdm";

for (const i of tqdm(range(100), { desc: "Training" })) {
  // Loop task
}

This will display a progress bar in the terminal, indicating the progress of the loop.

Training 2%|█░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░|5/170 [00:03<01:40, 1.65it/s]

Options

tqdm accepts an options object to customize the progress bar:

  • desc - Description text
  • total - Total iterations

Dependencies

This library depends on cli-progress to handle the actual progress bar rendering.

License

MIT

0.1.4

10 months ago

0.1.3

1 year ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago