(envelope: unknown)
| 3 | const encoder = new TextEncoder() |
| 4 | |
| 5 | export function encodeSSEEnvelope(envelope: unknown): Uint8Array { |
| 6 | return encoder.encode(`data: ${JSON.stringify(envelope)}\n\n`) |
| 7 | } |
| 8 | |
| 9 | export function encodeSSEComment(comment: string): Uint8Array { |
| 10 | return encoder.encode(`: ${comment}\n\n`) |
no outgoing calls
no test coverage detected