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

Function cloneTypedArray

test/babel.js:28224–28227  ·  view source on GitHub ↗

* Creates a clone of `typedArray`. * * @private * @param {Object} typedArray The typed array to clone. * @param {boolean} [isDeep] Specify a deep clone. * @returns {Object} Returns the cloned typed array.

(typedArray, isDeep)

Source from the content-addressed store, hash-verified

28222 * @returns {Object} Returns the cloned typed array.
28223 */
28224 function cloneTypedArray(typedArray, isDeep) {
28225 var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
28226 return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
28227 }
28228
28229 module.exports = cloneTypedArray;
28230

Callers 2

baseMergeDeepFunction · 0.85
initCloneByTagFunction · 0.85

Calls 1

cloneArrayBufferFunction · 0.85

Tested by

no test coverage detected