Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/packages/ansi-escape/mod.ts>AnsiEscape

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class AnsiEscape
import { AnsiEscape } from "https://deno.land/x/cliffy@v0.11.2/packages/ansi-escape/mod.ts";

Constructors

new
protected
AnsiEscape(file: Deno.WriterSync)

Methods

cursorBackward(count?: number)

Move cursor left by n lines.

cursorDown(count?: number)

Move cursor down by n lines.

cursorForward(count?: number)

Move cursor right by n lines.

Hide cursor.

Move cursor to first column of current row.

cursorMove(x: number, y: number)

Move cursor by offset.

cursorNextLine(count?: number)

Move cursor to the beginning of the line n lines down.

cursorPrevLine(count?: number)

Move cursor to the beginning of the line n lines up.

Restore cursor.

Save cursor.

Show cursor.

cursorTo(x: number, y?: number)

Move cursor to x, y, counting from the top left corner.

cursorUp(count?: number)

Move cursor up by n lines.

eraseDown(count?: number)

Clear screen down.

Clear current line.

Clear to line end.

eraseLines(count: number)

Clear n line's up.

Clear to line start.

Clear screen.

eraseUp(count?: number)

Clear screen up.

image(buffer: Uint8Array, options?: ImageOptions)

Render image.

scrollDown(count?: number)

Scroll window down by n lines.

scrollUp(count?: number)

Scroll window up by n lines.

write(code: string): this

Write to file.

Static Methods

from(file: Deno.WriterSync): AnsiEscape

Create instance from file.