* Checks whether n bytes are available in the current buffer. * @param {number} n n * @returns {boolean} true when in current buffer, otherwise false
(n)
| 205 | * @returns {boolean} true when in current buffer, otherwise false |
| 206 | */ |
| 207 | isInCurrentBuffer(n) { |
| 208 | return ( |
| 209 | this.currentIsBuffer && |
| 210 | n + this.currentPosition <= |
| 211 | /** @type {Buffer} */ (this.currentBuffer).length |
| 212 | ); |
| 213 | } |
| 214 | |
| 215 | ensureBuffer() { |
| 216 | if (!this.currentIsBuffer) { |
no outgoing calls
no test coverage detected