📅 You're Invited: Meet the Socket team at RSAC (April 28 – May 1).RSVP
Socket
Sign inDemoInstall
Socket

tty-aware-progress

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tty-aware-progress

The excellent `progress` package from npm will unfortunately ignore non-TTY environments like CI (circle-ci, travis, etc). This package uses `progress`, but in case of non-TTY, the progress will be output as rolling logs.

1.0.3
Source
npm
Version published
Weekly downloads
2.5K
-37.26%
Maintainers
1
Weekly downloads
 
Created
Source

tty-aware-progress

The excellent progress package from npm will unfortunately ignore non-TTY environments like CI (circle-ci, travis, etc). This package uses progress, but in case of non-TTY, the progress will be output as rolling logs.

Install

npm install tty-aware-progress
# or
yarn add tty-aware-progress

Use

tty-aware-progress will only need the total number of expected ticks like shown below. It returns a function that emits progress.

import createProgress from 'tty-aware-progress';

const progress = createProgress(100);
for (var i = 0; i < 100; i++) {
  progress();
}

// OR

const progress = createProgress(100);
for (var i = 0; i < 10; i++) {
  progress(10);
}

FAQs

Package last updated on 12 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