MCPcopy Index your code
hub / github.com/Effect-TS/effect / lines

Function lines

packages/cli/src/internal/prompt/ansi-utils.ts:64–72  ·  view source on GitHub ↗
(prompt: string, columns: number)

Source from the content-addressed store, hash-verified

62
63/** @internal */
64export function lines(prompt: string, columns: number): number {
65 const lines = prompt.split(/\r?\n/)
66 return columns === 0
67 ? lines.length
68 : pipe(
69 Arr.map(lines, (line) => Math.ceil(line.length / columns)),
70 Arr.reduce(0, (left, right) => left + right)
71 )
72}

Callers

nothing calls this directly

Calls 3

splitMethod · 0.80
mapMethod · 0.65
pipeFunction · 0.50

Tested by

no test coverage detected