mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-10 10:57:49 +00:00
Bump to v3.1.0.
This commit is contained in:
committed by
John-David Dalton
parent
3b2df88eab
commit
1608d89174
@@ -1,4 +1,4 @@
|
||||
define(['../internal/baseCallback', '../internal/isIterateeCall'], function(baseCallback, isIterateeCall) {
|
||||
define(['../internal/baseCallback', '../internal/isIterateeCall', '../internal/isObjectLike', './matches'], function(baseCallback, isIterateeCall, isObjectLike, matches) {
|
||||
|
||||
/**
|
||||
* Creates a function bound to an optional `thisArg`. If `func` is a property
|
||||
@@ -39,7 +39,9 @@ define(['../internal/baseCallback', '../internal/isIterateeCall'], function(base
|
||||
if (guard && isIterateeCall(func, thisArg, guard)) {
|
||||
thisArg = null;
|
||||
}
|
||||
return baseCallback(func, thisArg);
|
||||
return isObjectLike(func)
|
||||
? matches(func)
|
||||
: baseCallback(func, thisArg);
|
||||
}
|
||||
|
||||
return callback;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
define(['../internal/baseMatches'], function(baseMatches) {
|
||||
define(['../internal/baseClone', '../internal/baseMatches'], function(baseClone, baseMatches) {
|
||||
|
||||
/**
|
||||
* Creates a function which performs a deep comparison between a given object
|
||||
@@ -26,7 +26,7 @@ define(['../internal/baseMatches'], function(baseMatches) {
|
||||
* // => { 'user': 'barney', 'age': 36 }
|
||||
*/
|
||||
function matches(source) {
|
||||
return baseMatches(source, true);
|
||||
return baseMatches(baseClone(source, true));
|
||||
}
|
||||
|
||||
return matches;
|
||||
|
||||
Reference in New Issue
Block a user