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

Method empty

streams/buffer.ts:238–240  ·  view source on GitHub ↗

* 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

()

Source from the content-addressed store, hash-verified

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.

Callers 1

BufferClass · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected