typer-effect

1.0.3 • Public • Published

Typer-effect

The Typer-effect module is a module that adds a typing effect to a given text string. It simulates the effect of a user typing out a message on the console by printing out each character of the message one by one with a specified delay between each character. The module allows you to customize the delay between each character and also allows you to specify the color of the text being printed. The typing module can be used in any Node.js application to add a dynamic and interactive touch to your console output, and can be particularly useful for creating CLI tools or interactive command-line interfaces.

Installation

You can install the typer-effect module using npm:

npm install typer-effect

Usage

To use the typer-effect module in your Node.js project, you can import the module like this:

const TyperEffect = require('typer-effect');

You can then call the typingEffect function with the desired arguments to add a typing effect to a text string:

TyperEffect({text: "Hello, world!", color: "green", delay: 100})

The first argument to the typingEffect function is the text string to add the typing effect to. The second argument is an optional options object with the following properties:

delay (default: 50): The delay (in milliseconds) between each character being printed. color (default: null): The color of the text being printed. colors: reset, red, green, blue, cyan, yellow, black white, magenta

Example

Here's an example of how you can use the typing-effect module to add a typing effect to a text string:

const TyperEffect = require('typer-effect');

TyperEffect({text: "Hello, world!", color: "green", delay: 100})

Readme

Keywords

Package Sidebar

Install

npm i typer-effect

Weekly Downloads

1

Version

1.0.3

License

ISC

Unpacked Size

3.65 kB

Total Files

3

Last publish

Collaborators

  • kittycats