MCPcopy Index your code
hub / github.com/TanStack/ai / parseSseDataLine

Function parseSseDataLine

packages/ai-client/src/sse-utils.ts:1–8  ·  view source on GitHub ↗
(line: string)

Source from the content-addressed store, hash-verified

1export function parseSseDataLine(line: string): string {
2 if (!line.startsWith('data:')) {
3 return line
4 }
5
6 const data = line.slice(5)
7 return data.startsWith(' ') ? data.slice(1) : data
8}

Callers 3

responseToSSEChunksFunction · 0.90
connectFunction · 0.90
parseSSEResponseFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected