(chunk, _enc, cb)
| 47 | } |
| 48 | |
| 49 | _transform(chunk, _enc, cb) { |
| 50 | this._buf += chunk.toString(); |
| 51 | const parts = this._buf.split('\n\n'); |
| 52 | this._buf = parts.pop(); |
| 53 | for (const part of parts) { |
| 54 | this.push(this._fix(part) + '\n\n'); |
| 55 | } |
| 56 | cb(); |
| 57 | } |
| 58 | |
| 59 | _fix(event) { |
| 60 | const m = event.match(/^data: (.+)$/m); |