Skip to content

Latest commit

 

History

History

ansi-escape

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 

Cliffy ❯ ANSI Escape

Version Release date Deno version Build status issues Licence

Control cli cursor, erase output and scroll window.
>_ Used by cliffy's prompt module

❯ Content

❯ Install

This module can be imported directly from the repo and from following registries.

Deno Registry

import { AnsiEscape } from "https://deno.land/x/cliffy@<version>/ansi-escape/mod.ts";

Nest Registry

import { AnsiEscape } from "https://x.nest.land/cliffy@<version>/ansi-escape/mod.ts";

Github

import { AnsiEscape } from "https://raw.githubusercontent.com/c4spar/deno-cliffy/<version>/ansi-escape/mod.ts";

❯ Usage

import { AnsiEscape } from "https://deno.land/x/cliffy/ansi-escape/mod.ts";

AnsiEscape.from(Deno.stdout)
  // Hide cursor:
  .cursorHide()
  // Show cursor:
  .cursorShow()
  // Erase current line:
  .eraseLine()
  // Erase three line's up:
  .eraseLines(3)
  // Scroll two line's up:
  .scrollUp(2)
  // Scroll one line down:
  .scrollDown()
    // ...

❯ Contributing

Any kind of contribution is welcome! Please take a look at the contributing guidelines.

❯ License

MIT