1.0.16 • Published 7 years ago

simple-text-spinner v1.0.16

Weekly downloads
5
License
MIT
Repository
github
Last release
7 years ago

This module was created to allow create easy animations with text in node.

npm version License: MIT

Installation

npm install -S simple-text-spinner

Usage

const SimpleTextSpinner = require('simple-text-spinner');

let spinner = new SimpleTextSpinner({options});

//Plays the current animation
spinner.play();
//Stops the current animation
spinner.pause();
//Inverts the animation
spinner.invert();

//Returns the current animation text
spinner.getText();
//Returns the percentatge amount of the animation
spinner.getPercentage();

//Sets the label that will affect the animation, can be undefined.
//Works like jquery ('.class', '#id', 'div')
spinner.setTag(str);
//Sets the interval between every frame of the animation
spinner.setInterval(int);

//Returns if the animations is paused
spinner.isPaused();

//Prints in console the current text
spinner.print();

Options

new SimpleTextSpinner({
  tag: undefined,
  interval: 100,
  paused: false,
  defaultPosition: 0,
  pattern: ['⠇', '⠋', '⠙', '⠸', '⠴', '⠦'],
  inverse: false
});
1.0.16

7 years ago

1.0.15

7 years ago

1.0.14

7 years ago

1.0.13

7 years ago

1.0.12

7 years ago

1.0.11

7 years ago

1.0.10

7 years ago

1.0.9

7 years ago

1.0.8

7 years ago

1.0.7

7 years ago

1.0.6

7 years ago