Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ntqdm

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ntqdm

tqdm for node

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.6K
decreased by-49.1%
Maintainers
1
Weekly downloads
 
Created
Source

ntqdm

tqdm for node

wrap an iterable in tdqm, and it will update the progress bar as it iterates

install

npm install ntqdm

usage:

var tdqm = require(ntqdm)();

var t = [1,2,3,4,5,6,7,8,9,10];
for(let i of tdqm(t)) {
	sleep(1000);
}

for infinite iterables, you need to specify a total number of iteations to complete. If no total is specified, tdqm tries to find the total by iterating.

for(let i of tdqm(generator(), {total:50})) {
	sleep(1000);
}

normally, tdqm updates the same line, and assumes nothing else is written to stdout, you can set logging to true to output on new lines

for(let i of tdqm(generator(), {total:50, logging:true})) {
	sleep(1000);
	console.log("foo");
}

other switches:

desc - text to add above the progress bar
minIter - the minimum number of iterations to complete between updates minInterval - the amount of time between iterations

Keywords

FAQs

Package last updated on 03 Jun 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc