Skip to main content
Module

x/cliffy/ansi/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@v1.0.0-rc.3/ansi/mod.ts";

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

import { ansi } from "./mod.ts";

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

Or shorter:

import { ansi } from "./mod.ts";

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