mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 07:47:49 +00:00
Bump to v3.10.0.
This commit is contained in:
25
internal/arrayConcat.js
Normal file
25
internal/arrayConcat.js
Normal file
@@ -0,0 +1,25 @@
|
||||
/**
|
||||
* Creates a new array joining `array` with `other`.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to join.
|
||||
* @param {Array} other The other array to join.
|
||||
* @returns {Array} Returns the new concatenated array.
|
||||
*/
|
||||
function arrayConcat(array, other) {
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
othIndex = -1,
|
||||
othLength = other.length,
|
||||
result = Array(length + othLength);
|
||||
|
||||
while (++index < length) {
|
||||
result[index] = array[index];
|
||||
}
|
||||
while (++othIndex < othLength) {
|
||||
result[index++] = other[othIndex];
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
export default arrayConcat;
|
||||
Reference in New Issue
Block a user