spinny

1.0.1 • Public • Published

spinny

Console wait indicators inspired by this SO thread.

Demo

npm i spinny
node node_modules/spinny

# You can supply a spinner name as the last argument
node node_modules/spinny clock

Usage

var spinny = require('spinny');

// Start the spinner with a call to spinny()
var spinner = spinny();

// Do some async work...

// Stop the spinner by calling stop() on your spinner
spinner.stop();

// Create a different kind of spinner
spinny.clock();
spinny.slashes();

// Display a message with the spinner
spinny('Downloading, please wait...');

// Change the speed of the spinner
spinny('Optional message', {
  duration: 2000 // milliseconds for one cycle of the animation
});

spinny({
  interval: 100 // milliseconds for a single animation frame
});

Spinners

  • braille
  • brailleCircle
  • arrows
  • volume
  • width
  • corner
  • boxCorner
  • circleCorner
  • slashes
  • halfNHalf
  • blink
  • moon
  • clock

/spinny/

    Package Sidebar

    Install

    npm i spinny

    Weekly Downloads

    0

    Version

    1.0.1

    License

    BSD-3-Clause

    Last publish

    Collaborators

    • r24y
    • ryaninvents