ts-tqdm
TypeScript icon, indicating that this package has built-in type declarations

0.8.6 • Public • Published

ts-tqdm

A tqdm for node (Typescript).

Installation

npm

npm install ts-tqdm

source

npm install https://github.com/delarco/ts-tqdm.git

Usage

Import ts-tqdm

import { tqdm } from "ts-tqdm"

Array:

for (let item of tqdm([1, 2, 3, 4, 5, 6])) {
    // do stuff
}

Fixed iterations:

for (let item of tqdm(1000)) {
    // do stuff
}

Example

import { tqdm } from "ts-tqdm"

const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));

(async () => {

    for (let _ of tqdm(1000)) {

        await delay(100);
    }
})();

Package Sidebar

Install

npm i ts-tqdm

Weekly Downloads

60

Version

0.8.6

License

MIT

Unpacked Size

6.15 kB

Total Files

7

Last publish

Collaborators

  • delarco