Class | Description |
---|---|
Snowfall | A JavaScript class that displays a snowfall-like effect on the console screen. |
Snowfall.start() |
Initializes the Snowfall effect on the console. It starts generating snowflakes that fall down from the top of the console screen. |
Snowfall.stop() |
Stops the Snowfall effect on the console and clears the console screen. It stops generating snowflakes and clears the console screen. |
Class | Description |
---|---|
Matrix | A JavaScript class that displays a matrix-like effect on the console screen. |
Matrix.start(letters = ["0", "1"]) |
Initializes the Matrix effect on the console. It takes an optional letters argument, which is an array of characters that can be displayed on the screen. If letters is not provided, the Matrix effect will use only the characters 0 and 1. |
Matrix.stop() |
Stops the Matrix effect on the console and clears the console screen. |
Function | Description |
---|---|
Rainbow | A JavaScript function that takes a message as an argument and adds a random color to each letter in the message. |
rainbow(message) |
Logs the colored message to the console. |
Function | Description |
---|---|
renderVideo | Converts a video file into a series of ASCII frames. |
renderVideo(videoPath) |
Returns a Promise that resolves to an array of ASCII frames representing the video file. |
Function | Description |
---|---|
renderImage | Converts an image to a string of ANSI escape codes representing the image in the terminal. |
renderImage(image) |
Returns a Promise that resolves to a string of ANSI escape codes representing the image in the terminal. |
renderImage.rgbToAnsi256(r, g, b) |
Converts an RGB color value to its corresponding ANSI escape code value. |
Class | Description |
---|---|
Mute | A class used to mute and capture the output of process.stdout.write() method. |
<instance>.mute() |
Mutes the process.stdout.write() method by overriding it with a new function that stores all the output in the this.output property and does not output anything to the console. |
<instance>.unmute() |
Restores the original process.stdout.write() method by assigning this.originalWrite to it. |
<instance>.clearOutput() |
Clears the this.output property by setting it to an empty string. |
<instance>.getOutput() |
Returns the captured output stored in the this.output property. |