node-typewriter
v0.0.2
Published
A library for simulating a typewriter style-text on node CLI
Downloads
11
Readme
![Downloads][downloads-image] [![Dependency status][david-dm-image]][david-dm-url] [![Dev Dependency status][david-dm-dev-image]][david-dm-dev-url] [![Built with Grunt][grunt-image]][grunt-url]
A library for simulating a typewriter style-text on node CLI
Install
$ npm install --save node-typewriter
Usage
Arguments
- str - String to print
- speed - How long typing animation should take
- blink - Should cursor blinking animation be used? Cursor will be blinking even AFTER the callback/promise is fulfilled. Use stopBlink method to manually stop blinking. Blinking will be disabled on next typewriter run
Supports both promises and standard callback.
Promise
var typewriter = require('node-typewriter');
typewriter('Hello World!').then(function(){
console.log('Typing finished');
});
Standard callback
var typewriter = require('node-typewriter');
typewriter('Hello World!',undefined,false,function(){
console.log('Typing finished');
});```
**Disable blinking**
``` js
var typewriter = require('node-typewriter');
typewriter.stopBlinking();```
License
GPL v2 © Derrick Hammer