Socket
Book a DemoInstallSign in
Socket

@open-tech-world/node-cli-progress

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@open-tech-world/node-cli-progress

CLI spinner with task progress result.

latest
Source
npmnpm
Version
0.2.1
Version published
Maintainers
1
Created
Source

@open-tech-world/node-cli-progress

Build CodeFactor npm (scoped)

CLI spinner with task progress result.

Installation

Using npm

npm install @open-tech-world/node-cli-progress

Using Yarn

yarn add @open-tech-world/node-cli-progress

Usage

import { cliProgress } from '@open-tech-world/node-cli-progress';

const progress = new cliProgress();
progress.start();
setTimeout(() => {
  progress.update('Downloading');
}, 1000);
progress.done('Download completed!');

API

new cliProgress(options?: Partial<IOptions>)

It creates a new instance of the cliProgress.

options:

NameTypeDefaultDescription
streamNodeJS.WriteStreamprocess.stderrThe stream to use.

Instance methods:

start(text?: string)

This method starts the spinner with optional text.

The default text is Loading.

update(text: string)

This method updates the current text with the given text.

done(text?: string)

This method stops the spinner and mark the task as success with optional text.

fail(text?: string)

This method stops the spinner and mark the task as failed with optional text.

warn(text?: string)

This method stops the spinner and mark the task as warning with optional text.

info(text?: string)

This method stops the spinner and mark the task as info with optional text.

License

Copyright (c) 2021, Thanga Ganapathy (MIT License).

Keywords

cli

FAQs

Package last updated on 17 Aug 2021

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