moveCursorRight

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

function ยท experimental

function moveCursorRight(x: number = 1): string

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

x: number = 1

The number of columns to move right.

Returns

The ANSI escape code for moving the cursor right.

Example: Usage

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

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

Source