@zzkit/tqdm
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

@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

Readme

Keywords

none

Package Sidebar

Install

npm i @zzkit/tqdm

Weekly Downloads

3

Version

0.1.3

License

MIT

Unpacked Size

83.3 kB

Total Files

12

Last publish

Collaborators

  • luke_zhang