A tqdm for node (Typescript).
npm install ts-tqdm
npm install https://github.com/delarco/ts-tqdm.git
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
}
import { tqdm } from "ts-tqdm"
const delay = (ms: number) => new Promise(resolve => setTimeout(resolve, ms));
(async () => {
for (let _ of tqdm(1000)) {
await delay(100);
}
})();