SINGLE_WIDTH

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

variable ยท experimental

const SINGLE_WIDTH: "\u001b#5"

Causes content on the current line to shrink down to a single column, essentially reverting the effects of DOUBLE_HEIGHT_TOP, DOUBLE_HEIGHT_BOTTOM, or DOUBLE_WIDTH.

Returns

The ANSI escape code for single-width.

Example: Usage

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

console.log(Ansi.DOUBLE_HEIGHT_TOP + "Hello World!");
console.log(Ansi.DOUBLE_HEIGHT_BOTTOM + "Hello World!");
await delay(1000);
console.log(
  Ansi.moveCursorUpStart(2) +
    Ansi.deleteLines(1) +
    Ansi.SINGLE_WIDTH,
);

Source