1.1.6 • Published 9 months ago

termvas v1.1.6

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
9 months ago

TERMVAS

A simple library for dynamic terminal printing.

API

Using Termvas is very simple.

Initialization

To initialize Termvas, use the following:

let ui = new (require('termvas'))();

Now you can write individual characters or text anywhere on the screen! Termvas natively supports basic colors. Use 'default' to revert to your terminal's default colors. Set Character

To set a single character with optional colors:

ui.setChar(x, y, character, foregroundColor, backgroundColor);

###Example:

ui.setChar(1, 1, 'H', 'red', 'blue');

##Write Text

To write a string of text with optional colors:

ui.writeText(x, y, text, foregroundColor, backgroundColor);

###Example:

ui.writeText(5, 5, 'Hello, World!', 'red', 'blue');

Note: The foregroundColor and backgroundColor fields default to 'default' (the terminal's default colors). If not specified, the function will render text using these default values.

##Color Support

The following colors are supported for both the foreground and background:

  • black
  • red
  • green
  • yellow
  • blue
  • magenta
  • cyan
  • white
  • default (Terminal's default color)
1.1.6

9 months ago

1.1.5

9 months ago

1.1.4

9 months ago

1.1.3

9 months ago

1.1.2

9 months ago

1.1.1

9 months ago

1.1.0

9 months ago

1.0.8

9 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

1.0.3

9 months ago

1.0.1

9 months ago

1.0.0

9 months ago