Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

loading-spinner

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

loading-spinner

Loading spinner for NodeJS.

  • 1.1.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3.3K
decreased by-2.28%
Maintainers
1
Weekly downloads
 
Created
Source

loading-spinner

Loading spinner for NodeJS.

NPM

Build Status dependencies Status devDependencies Status NSP Status


Installation

npm install loading-spinner --save

Usage

var loadingSpinner = require('loading-spinner');

// Start the loading spinner
loadingSpinner.start(
  [Integer, default: 100], // Interval (in ms) between each spinner sequence element
  {
    clearChar:  [Boolean, default: false], // Clear the spinner when stop() is called
    clearLine:  [Boolean, default: false], // Clear the entire line when stop() is called
    doNotBlock: [Boolean, default: false], // Does not prevent the process from exiting
    hideCursor: [Boolean, default: false]  // Hide the cursor until stop() is called
  }
);

// Stop the loading spinner
loadingSpinner.stop();

// Customize the spinner sequence
loadingSpinner.setSequence(
  [Array, default: ['|','/','-','\\']], // Sequence of spinner elements
);

Example

var loadingSpinner = require('loading-spinner');

var dary = function() {
  loadingSpinner.stop();

  process.stdout.write('DA-RY !');
};

var legend = function() {
  process.stdout.write('It\'s gonna be LE-GEN... Wait for it... ');

  loadingSpinner.start(100, {
    clearChar: true
  });

  setTimeout(dary, 1000);
};

legend();

Keywords

FAQs

Package last updated on 20 Sep 2017

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