MCPcopy Index your code
hub / github.com/simstudioai/sim / stripCarriageReturn

Function stripCarriageReturn

apps/sim/lib/core/utils/sse.ts:107–109  ·  view source on GitHub ↗

* Strips an optional trailing carriage return from a single SSE line, so both * `\n`- and `\r\n`-terminated framings parse identically.

(line: string)

Source from the content-addressed store, hash-verified

105 * `\n`- and `\r\n`-terminated framings parse identically.
106 */
107function stripCarriageReturn(line: string): string {
108 return line.endsWith('\r') ? line.slice(0, -1) : line
109}
110
111/**
112 * The single client-side SSE decode engine. Reads a byte stream, decodes it

Callers 1

readSSELinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected