MCPcopy
hub / github.com/modelcontextprotocol/servers / normalizeLineEndings

Function normalizeLineEndings

src/filesystem/lib.ts:56–58  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

54}
55
56export function normalizeLineEndings(text: string): string {
57 return text.replace(/\r\n/g, '\n');
58}
59
60export function createUnifiedDiff(originalContent: string, newContent: string, filepath: string = 'file'): string {
61 // Ensure consistent line endings for diff

Callers 4

createUnifiedDiffFunction · 0.85
applyFileEditsFunction · 0.85
tailFileFunction · 0.85
lib.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected