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

Function withoutBreak

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

Source from the content-addressed store, hash-verified

724 line.endsWith("\n") ? prefix + line : `${prefix}${line}\n\\ No newline at end of file\n`
725
726const withoutBreak = (line: string): string => line.endsWith("\n") ? line.slice(0, -1) : line
727
728// The UTF-16 ranges of each line that differ from the other, ignoring a final `\n`
729const inlineRanges = (before: string, after: string, maxEdits: number | undefined) => {

Callers 1

inlineRangesFunction · 0.85

Calls 1

sliceMethod · 0.80

Tested by

no test coverage detected