Gathering detailed insights and metrics for tora-spinner
Gathering detailed insights and metrics for tora-spinner
Gathering detailed insights and metrics for tora-spinner
Gathering detailed insights and metrics for tora-spinner
A thread/worker spinner based on ora/yocto-spinner ✨
npm install tora-spinner
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70.8
Supply Chain
98.8
Quality
79.8
Maintenance
100
Vulnerability
100
License
TypeScript (70.09%)
JavaScript (29.91%)
Total Downloads
600
Last Day
2
Last Week
14
Last Month
42
Last Year
600
NOASSERTION License
16 Commits
2 Branches
1 Contributors
Updated on Oct 11, 2024
Minified
Minified + Gzipped
Latest Version
1.0.5
Package Id
tora-spinner@1.0.5
Unpacked Size
25.68 kB
Size
7.76 kB
File Count
13
NPM Version
9.6.3
Node Version
19.9.0
Published on
Sep 28, 2024
Cumulative downloads
Total Downloads
Last Day
100%
2
Compared to previous day
Last Week
16.7%
14
Compared to previous week
Last Month
100%
42
Compared to previous month
Last Year
0%
600
Compared to previous year
1
1
19
1npm i tora-spinner
1yarn add tora-spinner
1import tora from "tora-spinner"; 2 3const spinner = tora({ text: "Loading…" }); 4 5async function main() { 6 await spinner.start(); 7 8 // Do some work 9 await new Promise((resolve) => setTimeout(resolve, 1000)); 10 11 await spinner.stop("Stopped."); 12 13 // Kill spinner worker thread 14 spinner.terminate(); 15} 16 17main();
Creates a new spinner instance.
Type: object
Type: string
Default: ''
The text to display next to the spinner.
Type: object
Default:
Customize the spinner animation with a custom set of frames and interval.
1{ 2 frames: ['-', '\\', '|', '/'], 3 interval: 100, 4}
Pass in any spinner from cli-spinners
.
Type: string
Default: 'cyan'
Values: 'black' | 'red' | 'green' | 'yellow' | 'blue' | 'magenta' | 'cyan' | 'white' | 'gray'
The color of the spinner.
Type: stream.Writable
Default: process.stderr
The stream to which the spinner is written.
Starts the spinner.
Returns the instance.
Optionally, updates the text:
1spinner.start("Loading…");
Stops the spinner.
Returns the instance.
Optionally displays a final message.
1spinner.stop("Stopped.");
Stops the spinner and displays a success symbol with the message.
Returns the instance.
1spinner.success("Success!");
Stops the spinner and displays an error symbol with the message.
Returns the instance.
1spinner.error("Error!");
Stops the spinner and displays a warning symbol with the message.
Returns the instance.
1spinner.warning("Warning!");
Clears the spinner.
Returns the instance.
Stops the spinner and displays an info symbol with the message.
Returns the instance.
Kills the spinner worker thread.
Returns void.
1spinner.info("Info.");
Change the text displayed next to the spinner.
1spinner.text = "New text";
Change the spinner color.
Returns whether the spinner is currently spinning.
No vulnerabilities found.
No security vulnerabilities found.