MCPcopy Create free account
hub / github.com/denoland/std / empty

Method empty

io/buffer.ts:112–114  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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.

Callers 2

readSyncMethod · 0.95
readFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected