MCPcopy Index your code
hub / github.com/anomalyco/opencode / convertToLineEnding

Function convertToLineEnding

packages/opencode/src/tool/edit.ts:30–33  ·  view source on GitHub ↗
(text: string, ending: "\n" | "\r\n")

Source from the content-addressed store, hash-verified

28}
29
30function convertToLineEnding(text: string, ending: "\n" | "\r\n"): string {
31 if (ending === "\n") return text
32 return text.replaceAll("\n", "\r\n")
33}
34
35const locks = new Map<string, Semaphore.Semaphore>()
36

Callers 1

edit.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected