MCPcopy Create free account
hub / github.com/heygen-com/hyperframes / visibleLength

Function visibleLength

packages/cli/src/cloud/ansi.ts:24–26  ·  view source on GitHub ↗
(s: string)

Source from the content-addressed store, hash-verified

22
23/** Length of `s` after ANSI SGR codes are stripped. */
24export function visibleLength(s: string): number {
25 return stripAnsi(s).length;
26}
27
28/** Like `String.prototype.padEnd` but counts visible chars only. */
29export function padEndVisible(s: string, target: number): string {

Callers 2

padEndVisibleFunction · 0.85
ansi.test.tsFile · 0.85

Calls 1

stripAnsiFunction · 0.85

Tested by

no test coverage detected