Bump to v4.1.0.

This commit is contained in:
John-David Dalton
2016-01-28 01:19:04 -08:00
parent 7af5d55f22
commit 466c67a8b6
438 changed files with 1053 additions and 896 deletions

18
_cloneTypedArray.js Normal file
View File

@@ -0,0 +1,18 @@
import cloneBuffer from './_cloneBuffer';
/**
* Creates a clone of `typedArray`.
*
* @private
* @param {Object} typedArray The typed array to clone.
* @param {boolean} [isDeep] Specify a deep clone.
* @returns {Object} Returns the cloned typed array.
*/
function cloneTypedArray(typedArray, isDeep) {
var buffer = typedArray.buffer,
Ctor = typedArray.constructor;
return new Ctor(isDeep ? cloneBuffer(buffer) : buffer, typedArray.byteOffset, typedArray.length);
}
export default cloneTypedArray;