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

progress

Package Overview
Dependencies
Maintainers
4
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

progress

Flexible ascii progress bar

  • 2.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
4
Created

What is progress?

The 'progress' npm package is used to create a flexible text progress bar in the console. It is useful for tracking the progress of an operation in command-line applications.

What are progress's main functionalities?

Basic Progress Bar

This code sample demonstrates how to create a simple progress bar that updates every 100 milliseconds until it's complete.

const ProgressBar = require('progress');

let bar = new ProgressBar(':bar', { total: 10 });
let timer = setInterval(() => {
  bar.tick();
  if (bar.complete) {
    console.log('\nComplete!');
    clearInterval(timer);
  }
}, 100);

Custom Tokens

This code sample shows how to use custom tokens within the progress bar format to display additional information.

const ProgressBar = require('progress');

let bar = new ProgressBar(':current/:total (:percent) :bar :custom', { total: 20, width: 30 });
bar.tick({ custom: 'Token' });

Increment with Step

This code sample illustrates how to increment the progress bar by a step greater than one.

const ProgressBar = require('progress');

let bar = new ProgressBar(':bar', { total: 10 });
bar.tick(2);

Other packages similar to progress

Keywords

FAQs

Package last updated on 05 Dec 2018

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