Spinner for happy devs 😄
This spinner tries to get you happy while stuff is happening. For more awesome spinners check out ora.
Install
$ npm install --save happy-spinner
Usage
const text = 'Text be here'; // Optionalconst interval = 100; // Optionalconst happySpinner = text interval; happySpinnerstart; ; ;
API
text
Type: string
Text to display after the spinner.
interval
Type: number
Default: Provided by the spinner or 100
Interval between each frame.
Spinners provide their own recommended interval, so you don't really need to specify this.
Instance
.start()
Start the spinner. Returns the instance.
.stop()
Stop and clear the spinner. Returns the instance.
.succeed()
Stop the spinner, change it to a green ✔
and persist the text
. Returns the instance.
.fail()
Stop the spinner, change it to a red ✖
and persist the text
. Returns the instance.
.clear()
Clear the spinner. Returns the instance.
.render()
Manually render a new frame. Returns the instance.
.frame()
Get a new frame.
.text
Change the text.
.color
Change the spinner color.
Contributing
All Contributions are welcome! Please open up an issue if you would like to help out. 😄
License
Created with ♥ by Tiaan du Plessis. Licensed under the MIT License.