Skip to main content
Module

x/cliffy/mod.ts>ansi

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

Chainable ansi escape sequences. If invoked as method, a new Ansi instance will be returned.

await Deno.stdout.write(
  new TextEncoder().encode(
    ansi.cursorTo(0, 0).eraseScreen(),
  ),
);

Or shorter:

await Deno.stdout.write(
  ansi.cursorTo(0, 0).eraseScreen.toBuffer(),
);