source: trip-planner-front/node_modules/lodash/_cloneArrayBuffer.js@ 6fe77af

Last change on this file since 6fe77af was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 449 bytes
Line 
1var Uint8Array = require('./_Uint8Array');
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
16module.exports = cloneArrayBuffer;
Note: See TracBrowser for help on using the repository browser.