mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 01:47:48 +00:00
Bump to v3.2.0.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import baseMatches from './baseMatches';
|
||||
import baseMatchesProperty from './baseMatchesProperty';
|
||||
import baseProperty from './baseProperty';
|
||||
import bindCallback from './bindCallback';
|
||||
import identity from '../utility/identity';
|
||||
@@ -24,10 +25,12 @@ function baseCallback(func, thisArg, argCount) {
|
||||
if (func == null) {
|
||||
return identity;
|
||||
}
|
||||
// Handle "_.property" and "_.matches" style callback shorthands.
|
||||
return type == 'object'
|
||||
? baseMatches(func)
|
||||
: baseProperty(func + '');
|
||||
if (type == 'object') {
|
||||
return baseMatches(func);
|
||||
}
|
||||
return typeof thisArg == 'undefined'
|
||||
? baseProperty(func + '')
|
||||
: baseMatchesProperty(func + '', thisArg);
|
||||
}
|
||||
|
||||
export default baseCallback;
|
||||
|
||||
Reference in New Issue
Block a user