mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-01-29 06:27:49 +00:00
Rename getPlaceholder to getHolder.
This commit is contained in:
36
lodash.js
36
lodash.js
@@ -4468,7 +4468,7 @@
|
||||
var length = arguments.length,
|
||||
args = Array(length),
|
||||
index = length,
|
||||
placeholder = getPlaceholder(wrapper);
|
||||
placeholder = getHolder(wrapper);
|
||||
|
||||
while (index--) {
|
||||
args[index] = arguments[index];
|
||||
@@ -4590,7 +4590,7 @@
|
||||
args[index] = arguments[index];
|
||||
}
|
||||
if (isCurried) {
|
||||
var placeholder = getPlaceholder(wrapper),
|
||||
var placeholder = getHolder(wrapper),
|
||||
holdersCount = countHolders(args, placeholder);
|
||||
}
|
||||
if (partials) {
|
||||
@@ -5262,6 +5262,18 @@
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the argument placeholder value for `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to inspect.
|
||||
* @returns {*} Returns the placeholder value.
|
||||
*/
|
||||
function getHolder(func) {
|
||||
var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
|
||||
return object.placeholder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the appropriate "iteratee" function. If `_.iteratee` is customized,
|
||||
* this function returns the custom method, otherwise it returns `baseIteratee`.
|
||||
@@ -5337,18 +5349,6 @@
|
||||
return isNative(value) ? value : undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the argument placeholder value for `func`.
|
||||
*
|
||||
* @private
|
||||
* @param {Function} func The function to inspect.
|
||||
* @returns {*} Returns the placeholder value.
|
||||
*/
|
||||
function getPlaceholder(func) {
|
||||
var object = hasOwnProperty.call(lodash, 'placeholder') ? lodash : func;
|
||||
return object.placeholder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the `[[Prototype]]` of `value`.
|
||||
*
|
||||
@@ -9304,7 +9304,7 @@
|
||||
var bind = rest(function(func, thisArg, partials) {
|
||||
var bitmask = BIND_FLAG;
|
||||
if (partials.length) {
|
||||
var holders = replaceHolders(partials, getPlaceholder(bind));
|
||||
var holders = replaceHolders(partials, getHolder(bind));
|
||||
bitmask |= PARTIAL_FLAG;
|
||||
}
|
||||
return createWrapper(func, bitmask, thisArg, partials, holders);
|
||||
@@ -9358,7 +9358,7 @@
|
||||
var bindKey = rest(function(object, key, partials) {
|
||||
var bitmask = BIND_FLAG | BIND_KEY_FLAG;
|
||||
if (partials.length) {
|
||||
var holders = replaceHolders(partials, getPlaceholder(bindKey));
|
||||
var holders = replaceHolders(partials, getHolder(bindKey));
|
||||
bitmask |= PARTIAL_FLAG;
|
||||
}
|
||||
return createWrapper(key, bitmask, object, partials, holders);
|
||||
@@ -9899,7 +9899,7 @@
|
||||
* // => 'hi fred'
|
||||
*/
|
||||
var partial = rest(function(func, partials) {
|
||||
var holders = replaceHolders(partials, getPlaceholder(partial));
|
||||
var holders = replaceHolders(partials, getHolder(partial));
|
||||
return createWrapper(func, PARTIAL_FLAG, undefined, partials, holders);
|
||||
});
|
||||
|
||||
@@ -9936,7 +9936,7 @@
|
||||
* // => 'hello fred'
|
||||
*/
|
||||
var partialRight = rest(function(func, partials) {
|
||||
var holders = replaceHolders(partials, getPlaceholder(partialRight));
|
||||
var holders = replaceHolders(partials, getHolder(partialRight));
|
||||
return createWrapper(func, PARTIAL_RIGHT_FLAG, undefined, partials, holders);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user