MCPcopy Create free account
hub / github.com/axios/axios / isArrayBufferView

Function isArrayBufferView

lib/utils.js:126–134  ·  view source on GitHub ↗

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

(val)

Source from the content-addressed store, hash-verified

124 * @returns {boolean} True if value is a view on an ArrayBuffer, otherwise false
125 */
126function isArrayBufferView(val) {
127 let result;
128 if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView) {
129 result = ArrayBuffer.isView(val);
130 } else {
131 result = val && val.buffer && isArrayBuffer(val.buffer);
132 }
133 return result;
134}
135
136/**
137 * Determine if a value is a String

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected