MCPcopy Create free account
hub / github.com/ZenNotes/zennotes / termWidth

Function termWidth

apps/desktop/src/cli/help.ts:43–46  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

41const magenta = (s: string): string => wrap('\x1b[35m', s)
42
43function termWidth(): number {
44 const cols = process.stdout.columns ?? TERMINAL_COLUMNS_FALLBACK
45 return Math.min(Math.max(cols, 60), TERMINAL_COLUMNS_CAP)
46}
47
48function pad(value: string, width: number): string {
49 // visible length excludes ANSI codes; our command labels are

Callers 1

renderHelpFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected