mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-08 18:17:48 +00:00
Remove placeholder support from non-underscore builds.
This commit is contained in:
26
dist/lodash.js
vendored
26
dist/lodash.js
vendored
@@ -1691,7 +1691,7 @@
|
||||
* @param {Array} [partialRightArgs] An array of arguments to append to those
|
||||
* provided to the new function.
|
||||
* @param {Array} [partialHolders] An array of `partialArgs` placeholder indexes.
|
||||
* @param {Array} [partialRightArgs] An array of `partialRightArgs` placeholder indexes.
|
||||
* @param {Array} [partialRightHolders] An array of `partialRightArgs` placeholder indexes.
|
||||
* @returns {Function} Returns the new function.
|
||||
*/
|
||||
function createWrapper(func, bitmask, arity, thisArg, partialArgs, partialRightArgs, partialHolders, partialRightHolders) {
|
||||
@@ -1763,10 +1763,10 @@
|
||||
arity = 0;
|
||||
}
|
||||
if (isPartial) {
|
||||
partialHolders = getHolders(partialArgs);
|
||||
partialHolders = [];
|
||||
}
|
||||
if (isPartialRight) {
|
||||
partialRightHolders = getHolders(partialRightArgs);
|
||||
partialRightHolders = [];
|
||||
}
|
||||
// fast path for `_.bind`
|
||||
data = [func, bitmask, arity, thisArg, partialArgs, partialRightArgs, partialHolders, partialRightHolders];
|
||||
@@ -1775,26 +1775,6 @@
|
||||
: baseCreateWrapper(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds the indexes of all placeholder elements in a given array.
|
||||
*
|
||||
* @private
|
||||
* @param {Array} array The array to inspect.
|
||||
* @returns {Array} Returns a new array of placeholder indexes.
|
||||
*/
|
||||
function getHolders(array) {
|
||||
var index = -1,
|
||||
length = array.length,
|
||||
result = [];
|
||||
|
||||
while (++index < length) {
|
||||
if (array[index] === lodash) {
|
||||
result.push(index);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate "indexOf" function. If the `_.indexOf` method is
|
||||
* customized this method returns the custom method, otherwise it returns
|
||||
|
||||
Reference in New Issue
Block a user