* 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)
| 462 | * @returns {Array} Returns `array`. |
| 463 | */ |
| 464 | function 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`. |