(fn)
| 19273 | } |
| 19274 | this.chunkIndex = this.lineChunkIndex; |
| 19275 | this.pos = this.linePos; |
| 19276 | this.dropConsumedChunks(); |
| 19277 | } |
| 19278 | handleBOM() { |
| 19279 | const first = this.peekBufferedByte(0); |
| 19280 | const second = this.peekBufferedByte(1); |
| 19281 | const third = this.peekBufferedByte(2); |
| 19282 | if (second === void 0) { |
| 19283 | if (first === BOM[0]) { |
| 19284 | return true; |
| 19285 | } |
| 19286 | this.checkBOM = false; |
| 19287 | return true; |
| 19288 | } |
| 19289 | if (third === void 0) { |
| 19290 | if (first === BOM[0] && second === BOM[1]) { |
| 19291 | return true; |
| 19292 | } |
| 19293 | this.checkBOM = false; |
| 19294 | return false; |
| 19295 | } |
| 19296 | if (first === BOM[0] && second === BOM[1] && third === BOM[2]) { |
| 19297 | this.discardLeadingBytes(3); |
| 19298 | } |
| 19299 | this.checkBOM = false; |
| 19300 | return !this.hasCurrentByte(); |
| 19301 | } |
| 19302 | }; |
| 19303 | module.exports = { |
| 19304 | EventSourceStream |
| 19305 | }; |
| 19306 | } |
| 19307 | }); |
| 19308 | |
| 19309 | // |
| 19310 | var require_eventsource = __commonJS({ |
| 19311 | ""(exports, module) { |
| 19312 | "use strict"; |
| 19313 | var { pipeline } = __require("stream"); |
| 19314 | var { fetching } = require_fetch(); |
| 19315 | var { makeRequest } = require_request2(); |
no test coverage detected