2 * Copies the values of `source` to `array`.
5 * @param {Array} source The array to copy values from.
6 * @param {Array} [array=[]] The array to copy values to.
7 * @returns {Array} Returns `array`.
9 function copyArray(source, array) {
11 length = source.length;
13 array || (array = Array(length));
14 while (++index < length) {
15 array[index] = source[index];
20 module.exports = copyArray;