An open API service indexing awesome lists of open source software.

https://github.com/deno-library/termbox

Termbox is a deno package that provides a cell based view for text terminals.
https://github.com/deno-library/termbox

Last synced: about 1 month ago
JSON representation

Termbox is a deno package that provides a cell based view for text terminals.

Awesome Lists containing this project

README

        

# termbox

[![JSR Version](https://jsr.io/badges/@deno-library/termbox)](https://jsr.io/@deno-library/termbox)

Termbox is a deno package that provides a cell based view for text terminals.

## Usage

```ts
import TermBox from "jsr:@deno-library/termbox";
// or
// import TermBox from "https://deno.land/x/[email protected]/mod.ts";

const termbox = new TermBox();

termbox.setCell(x, y, "a");
```

## Interface

```ts
class TermBox {
constructor(size?: Size);
flush(): Promise;
size(): Size;
end(): void;

setCell(x: number, y: number, char: string): void;

cursorHide(): Promise;
cursorShow(): Promise;
cursorSave(): Promise;
cursorRestore(): Promise;
cursorTo(x: number, y: number): Promise;
cursorPosition(): Promise;

screenClear(): Promise;
screenReset(): Promise;
}

interface Size {
columns: number;
rows: number;
}
```

## example

> https://github.com/deno-library/sl