* 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)
| 2826 | * @returns {Array} Returns `array`. |
| 2827 | */ |
| 2828 | function arrayCopy(source, array) { |
| 2829 | var index = -1, |
| 2830 | length = source.length; |
| 2831 | |
| 2832 | array || (array = Array(length)); |
| 2833 | while (++index < length) { |
| 2834 | array[index] = source[index]; |
| 2835 | } |
| 2836 | return array; |
| 2837 | } |
| 2838 | |
| 2839 | /** |
| 2840 | * A specialized version of `_.forEach` for arrays without support for callback |
no outgoing calls
no test coverage detected