()
| 298 | return { feed, reset } |
| 299 | |
| 300 | function reset(): void { |
| 301 | generation++ |
| 302 | isFirstChunk = true |
| 303 | pending = [] |
| 304 | pendingLength = 0 |
| 305 | discardTrailingNewline = false |
| 306 | |
| 307 | lastEventId = undefined |
| 308 | eventName = undefined |
| 309 | data = "" |
| 310 | } |
| 311 | |
| 312 | function feed(chunk: string): SseError | undefined { |
| 313 | // Empty chunks must not consume the leading BOM check below |
no outgoing calls
no test coverage detected