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:
@@ -9,11 +9,8 @@ define(['./_cloneArrayBuffer'], function(cloneArrayBuffer) {
|
||||
* @returns {Object} Returns the cloned typed array.
|
||||
*/
|
||||
function cloneTypedArray(typedArray, isDeep) {
|
||||
var arrayBuffer = typedArray.buffer,
|
||||
buffer = isDeep ? cloneArrayBuffer(arrayBuffer) : arrayBuffer,
|
||||
Ctor = typedArray.constructor;
|
||||
|
||||
return new Ctor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
var buffer = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
|
||||
return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
|
||||
}
|
||||
|
||||
return cloneTypedArray;
|
||||
|
||||
Reference in New Issue
Block a user