MCPcopy
hub / github.com/vercel/hyper / copyArray

Function copyArray

bin/yarn-standalone.js:12481–12490  ·  view source on GitHub ↗

* Copies the values of `source` to `array`. * * @private * @param {Array} source The array to copy values from. * @param {Array} [array=[]] The array to copy values to. * @returns {Array} Returns `array`.

(source, array)

Source from the content-addressed store, hash-verified

12479 * @returns {Array} Returns `array`.
12480 */
12481 function copyArray(source, array) {
12482 var index = -1,
12483 length = source.length;
12484
12485 array || (array = Array(length));
12486 while (++index < length) {
12487 array[index] = source[index];
12488 }
12489 return array;
12490 }
12491
12492 /**
12493 * Copies properties of `source` to `object`.

Callers 12

lazyCloneFunction · 0.85
arraySampleSizeFunction · 0.85
arrayShuffleFunction · 0.85
baseCloneFunction · 0.85
baseMergeDeepFunction · 0.85
basePullAllFunction · 0.85
reorderFunction · 0.85
wrapperCloneFunction · 0.85
concatFunction · 0.85
toArrayFunction · 0.85
mixinFunction · 0.85
toPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected