Socket
Socket
Sign inDemoInstall

cli-infinity-progress

Package Overview
Dependencies
20
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    cli-infinity-progress

Use infinity progress-bar for command-line/terminal


Version published
Weekly downloads
175
increased by6.71%
Maintainers
1
Install size
352 kB
Created
Weekly downloads
 

Readme

Source

A infinity progress bar for terminal

cli-infinity-progress

Also customizable

You can add header, footer and change every time cli-infinity-progress-3

Install

npm install cli-infinity-progress

Usage

const CLIInfinityProgress = require('cli-infinity-progress');

const progress = new CLIInfinityProgress();
progress.start();

Methods:

NameReturnDesc
.setBarColor(colors.green)thisSet bar color const colors = require('cli-infinity-progress/colors');
.setBackgroundColor(colors.white)thisSet background color const colors = require('cli-infinity-progress/colors');
.setHeader('Header')thisSet header on top of progress. you can update every time
.setFooter('Footer')thisSet footer on bottom of progress. you can update every time
.setBarChar('🚕')thisSet bar char
.setBackgroundChar('-')thisSet background char
.setDirectionRightToLeft()thisProgress start from right default is left
.setDirectionLeftToRight()thisProgress start from left
.setSize(30)thisSet progress size default is 60
.setBarSize(5)thisSet bar size default is 20
.setRefreshRate(80)thisSet refresh rate default is (1000 / 25)ms
.start()thisStart progress
.remove()thisRemove progress from terminal
.stop()thisStop progress on terminal
.pause()thisPause progress on terminal
.resume()thisResume progress on terminal

You can call all methods as chaining ex:

const CLIInfinityProgress = require('cli-infinity-progress');
const colors = require('cli-infinity-progress/colors');

progress
  .setBackgroundColor(colors.yellow)
  .setHeader('Loading ...')
  .setFooter('\nPlease be patient.')
  .setBarChar('🚕')
  .setBackgroundChar('_')
  .setDirectionRightToLeft()
  .setSize(32)
  .setBarSize(1)
  .setRefreshRate(100)
  .start();

setTimeout(() => progress.setFooter('\nWoo, Cab is coming.'), 3000);

Result:

cli-infinity-progress-5



Roadmap

Keywords

FAQs

Last updated on 30 Mar 2021

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