MCPcopy Index your code
hub / github.com/dunky11/react-saas-template / copyArray

Function copyArray

src/shared/functions/toArray.js:464–474  ·  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

462 * @returns {Array} Returns `array`.
463 */
464function copyArray(source, array) {
465 let index = -1;
466
467 const length = source.length;
468
469 array || (array = Array(length));
470 while (++index < length) {
471 array[index] = source[index];
472 }
473 return array;
474}
475
476/**
477 * Gets the native function at `key` of `object`.

Callers 1

toArrayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected