Socket
Socket
Sign inDemoInstall

loading-indicator

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

loading-indicator

Simple and customizable command line idle status indicator.


Version published
Weekly downloads
141
decreased by-24.19%
Maintainers
1
Weekly downloads
 
Created
Source

loading-indicator Build Status

Simple and customizable command line loading indicator.

Install

$ npm install loading-indicator --save

Usage

var LoadingIndicator = require('loading-indicator');
var spin = new LoadingIndicator();

spin.start();

API

new LoadingIndicator([options])

options

Type: object

Available options.

options.preset

Type: string
Default: sticks

The visual preset you want.

Available values are:

  • sticks
  • circle
  • dots
  • bullets
  • arrows
options.sequence

Type: string or array

Custom animation sequence. This value will override preset.

options.delay

Type: number (milliseconds)
Default: 125

Delay for the render to be triggered.

options.prefix

Type: string
Default: empty string

String to be added to the begining of the output.

options.suffix

Type: string
Default: empty string

String to be added to the end of the output.

loadingIndicator.start()

Start loading animation.

loadingIndicator.stop()

Stop loading animation.

loadingIndicator.render()

Render animation to the stream.
This method is called internally so you don't need to manually call it.

License

MIT © Rafael Rinaldi

Keywords

FAQs

Package last updated on 16 Aug 2015

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