1.1.6 • Published 10 months ago

termvas v1.1.6

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
10 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

10 months ago

1.1.5

10 months ago

1.1.4

10 months ago

1.1.3

10 months ago

1.1.2

10 months ago

1.1.1

10 months ago

1.1.0

10 months ago

1.0.8

10 months ago

1.0.7

10 months ago

1.0.6

10 months ago

1.0.5

10 months ago

1.0.4

10 months ago

1.0.3

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago