mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-05 09:27:49 +00:00
Bump to v3.8.0.
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
var baseCallback = require('../internal/baseCallback'),
|
||||
isIterateeCall = require('../internal/isIterateeCall');
|
||||
isIterateeCall = require('../internal/isIterateeCall'),
|
||||
isObjectLike = require('../internal/isObjectLike'),
|
||||
matches = require('./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);
|
||||
}
|
||||
|
||||
module.exports = callback;
|
||||
|
||||
@@ -25,7 +25,7 @@ var invokePath = require('../internal/invokePath'),
|
||||
var method = restParam(function(path, args) {
|
||||
return function(object) {
|
||||
return invokePath(object, path, args);
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
module.exports = method;
|
||||
|
||||
Reference in New Issue
Block a user