Sha256: e4a07e9bc192acec93c967f52426333e3209e861b6591d7f122256db573d9288

Contents?: true

Size: 527 Bytes

Versions: 300

Compression:

Stored size: 527 Bytes

Contents

var cloneArrayBuffer = require('./_cloneArrayBuffer');

/**
 * 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 = isDeep ? cloneArrayBuffer(typedArray.buffer) : typedArray.buffer;
  return new typedArray.constructor(buffer, typedArray.byteOffset, typedArray.length);
}

module.exports = cloneTypedArray;

Version data entries

300 entries across 276 versions & 32 rubygems

Version Path
clapton-0.0.19 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.18 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.17 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.16 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.15 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
immosquare-cleaner-0.1.49 node_modules/lodash/_cloneTypedArray.js
clapton-0.0.14 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
immosquare-cleaner-0.1.48 node_modules/lodash/_cloneTypedArray.js
clapton-0.0.13 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.12 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.11 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.10 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.9 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.8 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.7 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.6 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.5 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.4 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.3 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js
clapton-0.0.2 lib/clapton/javascripts/node_modules/lodash/_cloneTypedArray.js