MCPcopy Index your code
hub / github.com/codeaashu/claude-code / widestLine

Function widestLine

src/ink/widest-line.ts:3–19  ·  view source on GitHub ↗
(string: string)

Source from the content-addressed store, hash-verified

1import { lineWidth } from './line-width-cache.js'
2
3export function widestLine(string: string): number {
4 let maxWidth = 0
5 let start = 0
6
7 while (start <= string.length) {
8 const end = string.indexOf('\n', start)
9 const line =
10 end === -1 ? string.substring(start) : string.substring(start, end)
11
12 maxWidth = Math.max(maxWidth, lineWidth(line))
13
14 if (end === -1) break
15 start = end + 1
16 }
17
18 return maxWidth
19}
20

Callers 2

getMethod · 0.85
renderNodeToOutputFunction · 0.85

Calls 2

lineWidthFunction · 0.85
maxMethod · 0.80

Tested by

no test coverage detected