mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-02 08:07:50 +00:00
Bump to v3.8.0.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
import baseCallback from '../internal/baseCallback';
|
||||
import isIterateeCall from '../internal/isIterateeCall';
|
||||
import isObjectLike from '../internal/isObjectLike';
|
||||
import matches from './matches';
|
||||
|
||||
/**
|
||||
* Creates a function that invokes `func` with the `this` binding of `thisArg`
|
||||
@@ -43,7 +45,9 @@ function callback(func, thisArg, guard) {
|
||||
if (guard && isIterateeCall(func, thisArg, guard)) {
|
||||
thisArg = null;
|
||||
}
|
||||
return baseCallback(func, thisArg);
|
||||
return isObjectLike(func)
|
||||
? matches(func)
|
||||
: baseCallback(func, thisArg);
|
||||
}
|
||||
|
||||
export default callback;
|
||||
|
||||
Reference in New Issue
Block a user