(data: any)
| 17 | * @returns The encoded SSE message as a Uint8Array |
| 18 | */ |
| 19 | export function encodeSSE(data: any): Uint8Array { |
| 20 | return new TextEncoder().encode(`data: ${JSON.stringify(data)}\n\n`) |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * The sentinel value servers emit to signal end-of-stream. Lines carrying this |
no outgoing calls
no test coverage detected