You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
437 B

  1. /**
  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. */
  9. function arrayPush(array, values) {
  10. var index = -1,
  11. length = values.length,
  12. offset = array.length;
  13. while (++index < length) {
  14. array[offset + index] = values[index];
  15. }
  16. return array;
  17. }
  18. module.exports = arrayPush;