Bump to v4.0.0.

This commit is contained in:
John-David Dalton
2015-08-24 10:34:23 -07:00
parent 4ef16c96e5
commit 0646bacd86
665 changed files with 24828 additions and 19696 deletions

View File

@@ -0,0 +1,18 @@
var cloneBuffer = require('./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);
}
module.exports = cloneTypedArray;