mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 16:17:50 +00:00
Bump to v4.6.0.
This commit is contained in:
@@ -8,11 +8,8 @@ define(['./_Uint8Array'], function(Uint8Array) {
|
||||
* @returns {ArrayBuffer} Returns the cloned array buffer.
|
||||
*/
|
||||
function cloneArrayBuffer(arrayBuffer) {
|
||||
var Ctor = arrayBuffer.constructor,
|
||||
result = new Ctor(arrayBuffer.byteLength),
|
||||
view = new Uint8Array(result);
|
||||
|
||||
view.set(new Uint8Array(arrayBuffer));
|
||||
var result = new arrayBuffer.constructor(arrayBuffer.byteLength);
|
||||
new Uint8Array(result).set(new Uint8Array(arrayBuffer));
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user