* Returns a slice holding the unread portion of the buffer. * * The slice is valid for use only until the next buffer modification (that * is, only until the next call to a method that mutates or consumes the * buffer, like reading data out via `readable`, `reset()`, or `truncate()`).
(options: BufferBytesOptions = { copy: true })
| 193 | * ``` |
| 194 | */ |
| 195 | bytes(options: BufferBytesOptions = { copy: true }): Uint8Array { |
| 196 | if (options.copy === false) return this.#buf.subarray(this.#off); |
| 197 | return this.#buf.slice(this.#off); |
| 198 | } |
| 199 | |
| 200 | /** |
| 201 | * Returns whether the unread portion of the buffer is empty. |
no test coverage detected