JSPM

ts-tqdm

0.8.6
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 163107
  • Score
    100M100P100Q168081F
  • License MIT

A tqdm for node (Typescript).

Package Exports

  • ts-tqdm
  • ts-tqdm/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (ts-tqdm) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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);
    }
})();