MCPcopy Create free account
hub / github.com/Effect-TS/effect / splitLines

Function splitLines

packages/effect/src/TextDiff.ts:716–716  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

714}
715
716const splitLines = (text: string): Array<string> => text.match(/[^\n]*\n|[^\n]+$/g) ?? []
717
718const range = (start: number, count: number): string =>
719 count === 0 ? `${start},0` : count === 1 ? `${start + 1}` : `${start + 1},${count}`

Callers 1

linesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected