MCPcopy
hub / github.com/axios/axios / isBuffer

Function isBuffer

lib/utils.js:99–108  ·  view source on GitHub ↗

* Determine if a value is a Buffer * * @param {*} val The value to test * * @returns {boolean} True if value is a Buffer, otherwise false

(val)

Source from the content-addressed store, hash-verified

97 * @returns {boolean} True if value is a Buffer, otherwise false
98 */
99function isBuffer(val) {
100 return (
101 val !== null &&
102 !isUndefined(val) &&
103 val.constructor !== null &&
104 !isUndefined(val.constructor) &&
105 isFunction(val.constructor.isBuffer) &&
106 val.constructor.isBuffer(val)
107 );
108}
109
110/**
111 * Determine if a value is an ArrayBuffer

Callers 5

isEmptyObjectFunction · 0.85
forEachFunction · 0.85
findKeyFunction · 0.85
mergeFunction · 0.85
visitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected