* @param {EventSourceStreamEvent} event
(event)
| 18872 | * @param {Buffer} chunk |
| 18873 | * @param {string} _encoding |
| 18874 | * @param {Function} callback |
| 18875 | * @returns {void} |
| 18876 | */ |
| 18877 | _transform(chunk, _encoding, callback) { |
| 18878 | if (chunk.length === 0) { |
| 18879 | callback(); |
| 18880 | return; |
| 18881 | } |
| 18882 | this.chunks.push(chunk); |
| 18883 | if (this.checkBOM) { |
| 18884 | if (this.handleBOM()) { |
| 18885 | callback(); |
| 18886 | return; |
| 18887 | } |
| 18888 | } |
| 18889 | while (this.hasCurrentByte()) { |
| 18890 | const byte = this.currentByte(); |
| 18891 | if (this.eventEndCheck) { |
| 18892 | if (this.crlfCheck) { |
| 18893 | if (byte === LF) { |
| 18894 | this.crlfCheck = false; |
no test coverage detected