Bump to v4.6.0.

This commit is contained in:
John-David Dalton
2016-02-29 23:41:02 -08:00
parent 9055c4e483
commit 7da4c55415
65 changed files with 413 additions and 235 deletions

View File

@@ -9,11 +9,8 @@ import cloneArrayBuffer from './_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);
}
export default cloneTypedArray;