MCPcopy Create free account
hub / github.com/RubyLouvre/anu / copyArray

Function copyArray

test/babel.js:21803–21812  ·  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

21801 * @returns {Array} Returns `array`.
21802 */
21803 function copyArray(source, array) {
21804 var index = -1,
21805 length = source.length;
21806
21807 array || (array = Array(length));
21808 while (++index < length) {
21809 array[index] = source[index];
21810 }
21811 return array;
21812 }
21813
21814 module.exports = copyArray;
21815

Callers 3

baseCloneFunction · 0.85
baseMergeDeepFunction · 0.85
basePullAllFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected