blob: 7d742b383e5a9af920d7d2f73b67277670268abb [file] [log] [blame]
Leo Repp58b9f112021-11-22 11:57:47 +01001/**
2 * Appends the elements of `values` to `array`.
3 *
4 * @private
5 * @param {Array} array The array to modify.
6 * @param {Array} values The values to append.
7 * @returns {Array} Returns `array`.
8 */
9function arrayPush(array, values) {
10 var index = -1,
11 length = values.length,
12 offset = array.length;
13
14 while (++index < length) {
15 array[offset + index] = values[index];
16 }
17 return array;
18}
19
20module.exports = arrayPush;