moveCursorLeft

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

function ยท experimental

function moveCursorLeft(x: number = 1): string

Moves cursor position x columns left or up to the left margin.

x: number = 1

The number of columns to move left.

Returns

The ANSI escape code for moving the cursor left.

Example: Usage

import * as Ansi from "@ende/cli/unstable-ansi";

console.log(
  Ansi.moveCursorRight(4) +
    Ansi.moveCursorLeft(2) +
    "Hello World!",
);

Source