* Returns whether the unread portion of the buffer is empty. * * @example Usage * ```ts * import { Buffer } from "@std/io/buffer"; * import { assertEquals } from "@std/assert/equals"; * * const buf = new Buffer(); * assertEquals(buf.empty(), true); * await buf.write(new Te
()
| 110 | * otherwise. |
| 111 | */ |
| 112 | empty(): boolean { |
| 113 | return this.#buf.byteLength <= this.#off; |
| 114 | } |
| 115 | |
| 116 | /** |
| 117 | * A read only number of bytes of the unread portion of the buffer. |