$ npm install light-spinner
light spinner
This is a no-dependencies minimal cli spinner, only 1kb.
$ npm i light-spinner --save
import Spin from 'light-spinner';
const spin = new Spin({
text: 'test',
});
spin.start();
// change text
spin.text = 'test 2';
spin.stop();
| 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 | ['⠋', '⠙', '⠹', '⠼', '⠴', '⠦', '⠧', '⠏'] |
© 2010 - cnpmjs.org x YWFE | Home | YWFE