moveCursorUp
import { moveCursorUp } from "jsr:@ende/cli/unstable-ansi";function ยท experimental
function moveCursorUp(x: number = 1): stringMoves cursor position up x lines or up to the top margin.
x: number = 1The number of lines to move up.
Returns
The ANSI escape code for moving the cursor up.
Example: Usage
import { delay } from "@ende/async/delay";
import * as Ansi from "@ende/cli/unstable-ansi";
console.log("Hello\nWorld!");
await delay(1000);
console.log(Ansi.moveCursorUp(2) + "Goodbye");