MCPcopy Create free account
hub / github.com/arctic-cli/interface / ellipsize

Function ellipsize

packages/arctic/src/cli/ui.ts:125–129  ·  view source on GitHub ↗
(value: string, width: number)

Source from the content-addressed store, hash-verified

123 }
124
125 function ellipsize(value: string, width: number) {
126 if (value.length <= width) return value
127 if (width <= 1) return value.slice(0, width)
128 return value.slice(0, width - 1) + "…"
129 }
130
131 function wrapText(value: string, width: number) {
132 if (!value) return [""]

Callers 1

buildLinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected