(n)
| 47 | } |
| 48 | |
| 49 | async read(n) { |
| 50 | if (this.eof()) return |
| 51 | if (!this.started) await this._init() |
| 52 | if (this.cursor + n > this.buffer.length) { |
| 53 | this._trim() |
| 54 | await this._accumulate(n) |
| 55 | } |
| 56 | this._moveCursor(n) |
| 57 | return this.buffer.slice(this.undoCursor, this.cursor) |
| 58 | } |
| 59 | |
| 60 | async skip(n) { |
| 61 | if (this.eof()) return |
no test coverage detected