MCPcopy Create free account
hub / github.com/RubyLouvre/anu / cloneArrayBuffer

Function cloneArrayBuffer

test/babel.js:21781–21785  ·  view source on GitHub ↗

* Creates a clone of `arrayBuffer`. * * @private * @param {ArrayBuffer} arrayBuffer The array buffer to clone. * @returns {ArrayBuffer} Returns the cloned array buffer.

(arrayBuffer)

Source from the content-addressed store, hash-verified

21779 * @returns {ArrayBuffer} Returns the cloned array buffer.
21780 */
21781 function cloneArrayBuffer(arrayBuffer) {
21782 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
21783 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
21784 return result;
21785 }
21786
21787 module.exports = cloneArrayBuffer;
21788

Callers 3

cloneTypedArrayFunction · 0.85
cloneDataViewFunction · 0.85
initCloneByTagFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected