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

gauge

Package Overview
Dependencies
Maintainers
6
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gauge

A terminal based horizontal gauge

  • 4.0.3
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20M
increased by14.76%
Maintainers
6
Weekly downloads
 
Created

What is gauge?

The gauge npm package is a minimalistic progress bar module for Node.js that can display different types of progress information. It is designed to be flexible and can be used in command-line applications to provide visual feedback to users about the progress of an operation.

What are gauge's main functionalities?

Basic Progress Bar

This feature allows you to create a basic progress bar that shows the progress of an operation. The 'show' method updates the progress bar with a label and the completion percentage.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.show('processing', 0.5);

Pulse

The 'pulse' method is used to keep the progress bar active without changing the progress. It can be used to indicate that an operation is ongoing when the progress percentage cannot be determined.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.pulse('item being processed');

Set the Progress

This feature allows you to update the progress bar to a specific value. The value is a fraction between 0 and 1, where 1 represents 100% completion.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.show('loading', 0.75);

Hide the Progress Bar

The 'hide' method is used to remove the progress bar from the display. This is typically used once an operation has completed.

const Gauge = require('gauge');
let gauge = new Gauge();
gauge.hide();

Other packages similar to gauge

Keywords

FAQs

Package last updated on 10 Mar 2022

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