Skip to content

EN Description: This is a no-dependencies minimal cli spinners, only 1KB. ZH-CN: 命令行进度旋转展示器,无任何依赖,超轻量

License

Notifications You must be signed in to change notification settings

echosoar/light-spinner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation



light spinner

This is a no-dependencies minimal cli spinner, only 1kb.

npm

Install

$ npm i light-spinner --save

Usage

import Spin from 'light-spinner';
const spin = new Spin({
  text: 'test',
});
spin.start();

// change text
spin.text = 'test 2';

spin.stop();

Options

option type desc default
text string console text empty string
timeout number the time of changing to next frame 100(ms)
spinners string[] frame list ['⠋', '⠙', '⠹', '⠼', '⠴', '⠦', '⠧', '⠏']
stream WritableStream the stream to send the output to stdout

MIT LICENSE

About

EN Description: This is a no-dependencies minimal cli spinners, only 1KB. ZH-CN: 命令行进度旋转展示器,无任何依赖,超轻量

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published