MCPcopy Create free account
hub / github.com/nodejs/node / isBuffer

Function isBuffer

deps/undici/src/lib/core/util.js:549–552  ·  view source on GitHub ↗

* @param {*} buffer * @returns {buffer is Buffer}

(buffer)

Source from the content-addressed store, hash-verified

547 * @returns {buffer is Buffer}
548 */
549function isBuffer (buffer) {
550 // See, https://github.com/mcollina/undici/pull/319
551 return buffer instanceof Uint8Array || Buffer.isBuffer(buffer)
552}
553
554/**
555 * Asserts that the handler object is a request handler.

Callers 2

bodyLengthFunction · 0.70
constructorMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected