Gathering detailed insights and metrics for yocto-spinner
Gathering detailed insights and metrics for yocto-spinner
Gathering detailed insights and metrics for yocto-spinner
Gathering detailed insights and metrics for yocto-spinner
npm install yocto-spinner
Typescript
Module System
Min. Node Version
Node Version
NPM Version
99.3
Supply Chain
99
Quality
84.5
Maintenance
100
Vulnerability
100
License
JavaScript (100%)
Total Downloads
5,530,359
Last Day
85,931
Last Week
451,135
Last Month
1,885,528
Last Year
5,530,359
MIT License
233 Stars
13 Commits
5 Forks
1 Watchers
1 Branches
3 Contributors
Updated on May 06, 2025
Latest Version
0.2.2
Package Id
yocto-spinner@0.2.2
Unpacked Size
13.97 kB
Size
4.96 kB
File Count
5
NPM Version
10.9.2
Node Version
23.6.1
Published on
Apr 20, 2025
Cumulative downloads
Total Downloads
Last Day
11.8%
85,931
Compared to previous day
Last Week
-2.7%
451,135
Compared to previous week
Last Month
45.7%
1,885,528
Compared to previous month
Last Year
0%
5,530,359
Compared to previous year
1
3
Tiny terminal spinner
SIGINT
, SIGTERM
)Check out ora
for more features.
1npm install yocto-spinner
1import yoctoSpinner from 'yocto-spinner'; 2 3const spinner = yoctoSpinner({text: 'Loading…'}).start(); 4 5setTimeout(() => { 6 spinner.success('Success!'); 7}, 2000);
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.
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.
Use yoctocolors
:
1import yoctoSpinner from 'yocto-spinner'; 2import {red} from 'yoctocolors'; 3 4const spinner = yoctoSpinner({text: `Loading ${red('unicorns')}`}).start();
JavaScript is single-threaded, so any synchronous operations will block the spinner's animation. To avoid this, prefer using asynchronous operations.
ora
Ora offers more options, greater customizability, promise handling, and better Unicode detection. It’s a more mature and feature-rich package that handles more edge cases but comes with additional dependencies and a larger size. In contrast, this package is smaller, simpler, and optimized for minimal overhead, making it ideal for lightweight projects where dependency size is important. However, Ora is generally the better choice for most use cases.
No vulnerabilities found.
No security vulnerabilities found.