tiny-spin
A tiny, zero-dependency CLI spinner
When you want a CLI spinner in just a few bytes. Installation:
npm i tiny-spin
or
yarn add tiny-spin
Usage:
// CommonJSconst spin = ; const stop = ; // Do stuff ;
// ESM ; const stop = ; // Do stuff ;
API
spin(message, frames, interval)
message
: the message displayed after the spinner. Default emptyframes
: an array of strings that are the frames displayed by the spinner. Default["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"]
interval
: the interval between frames. Default 80ms.
Returns a function that you call to stop the spinner.
Author: Matt Kane. MIT licence.