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

Function cloneDataView

test/babel.js:52246–52249  ·  view source on GitHub ↗

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

(dataView, isDeep)

Source from the content-addressed store, hash-verified

52244 * @returns {Object} Returns the cloned data view.
52245 */
52246 function cloneDataView(dataView, isDeep) {
52247 var buffer = isDeep ? cloneArrayBuffer(dataView.buffer) : dataView.buffer;
52248 return new dataView.constructor(buffer, dataView.byteOffset, dataView.byteLength);
52249 }
52250
52251 module.exports = cloneDataView;
52252

Callers 1

initCloneByTagFunction · 0.85

Calls 1

cloneArrayBufferFunction · 0.85

Tested by

no test coverage detected