source: imaps-frontend/node_modules/lodash-es/_cloneArrayBuffer.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 447 bytes
Line 
1import Uint8Array from './_Uint8Array.js';
2
3/**
4 * Creates a clone of `arrayBuffer`.
5 *
6 * @private
7 * @param {ArrayBuffer} arrayBuffer The array buffer to clone.
8 * @returns {ArrayBuffer} Returns the cloned array buffer.
9 */
10function cloneArrayBuffer(arrayBuffer) {
11 var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
12 new Uint8Array(result).set(new Uint8Array(arrayBuffer));
13 return result;
14}
15
16export default cloneArrayBuffer;
Note: See TracBrowser for help on using the repository browser.