JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19771
  • Score
    100M100P100Q136960F
  • License MIT

Colorful animations in terminal stdout

Package Exports

  • chalk-animation

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (chalk-animation) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

chalk-animation

Build Status npm XO code style

Colorful animations in terminal stdout

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'); // Animation starts

setTimeout(() => {
    rainbow.stop(); // Animation stops
}, 1000);

setTimeout(() => {
    rainbow.start(); // Animation resumes
}, 2000);

Anything printed to the console will stop the previous animation automatically

chalkAnimation.rainbow('Lorem ipsum');
setTimeout(() => {
    // Stop the 'Lorem ipsum' animation, then write on a new line.
    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', 2); // Two times faster than default

Available animations

  • rainbow
  • pulse
  • glitch
  • radar
  • neon

More to come soon!

Dependencies

License

MIT © Boris K