typeout2

1.0.2 • Public • Published

typeout Build Status

Print out text one char by one char

Install

$ npm install --save typeout2

Usage

const typeout = require('typeout');

typeout('Hello')
  .then(() => {
    // Some stuff to do after the animation.
  });

API

typeout(text, [opt])

Options

  • duration: duration for the whole animation, in milliseconds, default is 700.
  • delay: delay for every character, in milliseconds. When delay is specified, duration option will be ignored.
  • interruptable: whether user can skip the animation, default is false.
  • stream: the destination stream, default is process.stdout.

Best Practice

typeout use Promise to reflect the animation state, which may lead to a chaos procedure. With async and await keywords, you can make the procedure more intuitive and continuous.

License

MIT © Cyandev

Package Sidebar

Install

npm i typeout2

Weekly Downloads

0

Version

1.0.2

License

MIT

Last publish

Collaborators

  • unixzii