chalk-animation
Install
$ npm install --save chalk-animation
Usage
const chalkAnimation = require('chalk-animation');
chalkAnimation.rainbow('Lorem ipsum dolor sit amet');
You can stop and restart an animation
const rainbow = chalkAnimation.rainbow('Lorem ipsum');
setTimeout(() => {
rainbow.stop();
}, 1000);
setTimeout(() => {
rainbow.start();
}, 2000);
Anything printed to the console will stop the previous animation automatically
chalkAnimation.rainbow('Lorem ipsum');
setTimeout(() => {
console.log('dolor sit amet');
}, 1000);
Change the animation speed using a second parameter. Should be greater than 0, default is 1.
chalkAnimation.rainbow('Lorem ipsum dolor sit amet', 2);
Dependencies
License
MIT © Boris K