mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-11 19:37:49 +00:00
Rename the baseIteratee param func to value.
This commit is contained in:
18
lodash.js
18
lodash.js
@@ -2148,23 +2148,23 @@
|
|||||||
* The base implementation of `_.iteratee`.
|
* The base implementation of `_.iteratee`.
|
||||||
*
|
*
|
||||||
* @private
|
* @private
|
||||||
* @param {*} [func=_.identity] The value to convert to an iteratee.
|
* @param {*} [value=_.identity] The value to convert to an iteratee.
|
||||||
* @returns {Function} Returns the iteratee.
|
* @returns {Function} Returns the iteratee.
|
||||||
*/
|
*/
|
||||||
function baseIteratee(func) {
|
function baseIteratee(value) {
|
||||||
var type = typeof func;
|
var type = typeof value;
|
||||||
if (type == 'function') {
|
if (type == 'function') {
|
||||||
return func;
|
return value;
|
||||||
}
|
}
|
||||||
if (func == null) {
|
if (value == null) {
|
||||||
return identity;
|
return identity;
|
||||||
}
|
}
|
||||||
if (type == 'object') {
|
if (type == 'object') {
|
||||||
return isArray(func)
|
return isArray(value)
|
||||||
? baseMatchesProperty(func[0], func[1])
|
? baseMatchesProperty(value[0], value[1])
|
||||||
: baseMatches(func);
|
: baseMatches(value);
|
||||||
}
|
}
|
||||||
return property(func);
|
return property(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user