(length)
| 22571 | } |
| 22572 | |
| 22573 | peek(length) { |
| 22574 | const position = this._position; |
| 22575 | length = length === undefined ? this._length - this._position : length; |
| 22576 | this.skip(length); |
| 22577 | const end = this._position; |
| 22578 | this.skip(-length); |
| 22579 | if (position === 0 && length === this._length) { |
| 22580 | return this._buffer; |
| 22581 | } |
| 22582 | return this._buffer.subarray(position, end); |
| 22583 | } |
| 22584 | |
| 22585 | read(length) { |
| 22586 | const position = this._position; |
no test coverage detected