mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 19:07:49 +00:00
Cleanup appendHolders.
This commit is contained in:
21
lodash.js
21
lodash.js
@@ -1058,24 +1058,23 @@
|
|||||||
/*--------------------------------------------------------------------------*/
|
/*--------------------------------------------------------------------------*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Appends `otherHolders` placeholders to `holders` placeholders offseting
|
* Appends placeholder indexes to `array` adding `offset` to each appended index.
|
||||||
* `otherHolders` by `offset`.
|
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {Array} holders The placeholders augment.
|
* @param {Array} array The array of placeholder indexes to append to.
|
||||||
* @param {Array} otherHolders The placeholders to append.
|
* @param {Array} indexes The array of placeholder indexes to append.
|
||||||
* @param {number} offset The placeholder offset.
|
* @param {number} offset The placeholder offset.
|
||||||
* @returns {Array} Returns `holders`.
|
* @returns {Array} Returns `array`.
|
||||||
*/
|
*/
|
||||||
function appendHolders(holders, otherHolders, offset) {
|
function appendHolders(array, indexes, offset) {
|
||||||
var length = holders.length,
|
var length = array.length,
|
||||||
index = otherHolders.length;
|
index = indexes.length;
|
||||||
|
|
||||||
holders.length += index;
|
array.length += index;
|
||||||
while (index--) {
|
while (index--) {
|
||||||
holders[length + index] = offset + otherHolders[index];
|
array[length + index] = indexes[index] + offset;
|
||||||
}
|
}
|
||||||
return holders;
|
return array;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user