()
| 72 | } |
| 73 | |
| 74 | async _next() { |
| 75 | this.started = true |
| 76 | let { done, value } = await this.stream.next() |
| 77 | if (done) { |
| 78 | this._ended = true |
| 79 | if (!value) return Buffer.alloc(0) |
| 80 | } |
| 81 | if (value) { |
| 82 | value = Buffer.from(value) |
| 83 | } |
| 84 | return value |
| 85 | } |
| 86 | |
| 87 | _trim() { |
| 88 | // Throw away parts of the buffer we don't need anymore |
no test coverage detected