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-tqdmsource
npm install https://github.com/delarco/ts-tqdm.gitUsage
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);
}
})();