ERASE_DISPLAY_AFTER_CURSOR

import { ERASE_DISPLAY_AFTER_CURSOR } from "jsr:@ende/cli/unstable-ansi";

variable ยท experimental

const ERASE_DISPLAY_AFTER_CURSOR: "\u001b[0J"

Erases content of lines below cursor position and content to the right on the same line as cursor.

Returns

The ANSI escape code for erasing the content after the cursor.

Example: Usage

import { delay } from "@ende/async/delay";
import * as Ansi from "@ende/cli/unstable-ansi";

console.log("Hello World!");
await delay(1000);
console.log(
  Ansi.moveCursorUp() +
    Ansi.setCursorColumn(7) +
    Ansi.ERASE_DISPLAY_AFTER_CURSOR,
);

Source