* Returns whether the unread portion of the buffer is empty. * * @returns Whether the buffer is empty. * * @example Empty buffer * ```ts * import { assert } from "@std/assert"; * import { Buffer } from "@std/streams/buffer"; * * const buf = new Buffer(); * assert(buf.em
()
| 236 | * ``` |
| 237 | */ |
| 238 | empty(): boolean { |
| 239 | return this.#buf.byteLength <= this.#off; |
| 240 | } |
| 241 | |
| 242 | /** |
| 243 | * A read only number of bytes of the unread portion of the buffer. |