mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Move internal modules to “internal” folder.
This commit is contained in:
20
.internal/arrayPush.js
Normal file
20
.internal/arrayPush.js
Normal file
@@ -0,0 +1,20 @@
|
||||
/**
|
||||
* Appends the elements of `values` to `array`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to modify.
|
||||
* @param {Array} values The values to append.
|
||||
* @returns {Array} Returns `array`.
|
||||
*/
|
||||
function arrayPush(array, values) {
|
||||
let index = -1;
|
||||
const length = values.length;
|
||||
const offset = array.length;
|
||||
|
||||
while (++index < length) {
|
||||
array[offset + index] = values[index];
|
||||
}
|
||||
return array;
|
||||
}
|
||||
|
||||
export default arrayPush;
|
||||
Reference in New Issue
Block a user