New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

progbar

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

progbar

terminal progress bar

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
314
decreased by-30.07%
Maintainers
1
Weekly downloads
 
Created
Source

node-progbar

node-progbar is a library for drawing progress bars in xterm-like (or hopefully any somewhat ECMA-48-compatible) terminals.

Usage

var mod_progbar = require('progbar');

/*
 * Instantiate the ProgressBar class, like so.  This instance
 * represents a single transfer operation, and will draw one
 * final status report when the transfer is deemed over.
 *
 * NB: you may also set 'nosize' to true, instead of passing
 *     'size', if you do not know the length of the stream
 *     in advance.
 */
var bar = new mod_progbar.ProgressBar({
	filename: 'whatever.zip', // filename to display
	size: 10048               // filesize in bytes
});

/*
 * Usually, you would use the progress bar in Stream data
 * events, like so:
 */
stream.on('data', function (data) {
	bar.advance(data.length);
});
stream.on('end', function (data) {
	bar.end();
});

Keywords

FAQs

Package last updated on 19 Dec 2013

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