Socket
Socket
Sign inDemoInstall

gauge

Package Overview
Dependencies
13
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    gauge

A terminal based horizontal guage


Version published
Maintainers
1
Install size
102 kB
Created

Package description

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

Changelog

Source

v2.5.1

  • Update to signal-exit@3.0.0, which fixes a compatibility bug with the node profiler.
  • #39 Fix tests on 0.10 and add a missing devDependency. (@helloyou2012)

Keywords

FAQs

Last updated on 13 Jun 2016

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc