repeatLastCharacter

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

function ยท experimental

function repeatLastCharacter(x: number = 1): string

Repeats last graphic character printed x times at cursor position.

x: number = 1

The number of times the last character printed should be repeated.

Returns

The ANSI escape code for repeating the last printed character.

Example: Usage

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

console.log("Hello World!" + Ansi.repeatLastCharacter(4));

Source