npm install tiny-spinWhen you want a CLI spinner in just a few bytes. Installation:
``shell`
npm i tiny-spin
or
`shell`
yarn add tiny-spin
Usage:
`js
// CommonJS
const { spin } = require("tiny-spin");
const stop = spin("Doing stuff");
// Do stuff
stop();
`
`js
// ESM
import { spin } from "tiny-spin";
const stop = spin("Doing stuff");
// Do stuff
stop();
`
- 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.