()
| 16629 | this.dropConsumedChunks(); |
| 16630 | } |
| 16631 | dropConsumedChunks() { |
| 16632 | while (this.lineChunkIndex > 0) { |
| 16633 | this.chunks.shift(); |
| 16634 | this.lineChunkIndex--; |
| 16635 | this.chunkIndex--; |
| 16636 | } |
| 16637 | if (this.chunkIndex === this.chunks.length) { |
| 16638 | this.chunks.length = 0; |
| 16639 | this.chunkIndex = 0; |
| 16640 | this.pos = 0; |
| 16641 | this.lineChunkIndex = 0; |
| 16642 | this.linePos = 0; |
| 16643 | } |
| 16644 | } |
| 16645 | readLine() { |
| 16646 | if (this.lineChunkIndex === this.chunkIndex) { |
| 16647 | return this.chunks[this.chunkIndex].subarray(this.linePos, this.pos); |
no test coverage detected