()
| 266 | return { feed, reset } |
| 267 | |
| 268 | function reset(): void { |
| 269 | isFirstChunk = true |
| 270 | buffer = "" |
| 271 | startingPosition = 0 |
| 272 | startingFieldLength = -1 |
| 273 | discardTrailingNewline = false |
| 274 | |
| 275 | lastEventId = undefined |
| 276 | eventName = undefined |
| 277 | data = "" |
| 278 | } |
| 279 | |
| 280 | function feed(chunk: string): SseError | undefined { |
| 281 | buffer = buffer ? buffer + chunk : chunk |
no outgoing calls
no test coverage detected