Bump to v3.1.0.

This commit is contained in:
jdalton
2015-02-01 22:03:53 -08:00
committed by John-David Dalton
parent 3b2df88eab
commit 1608d89174
21 changed files with 118 additions and 58 deletions

View File

@@ -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;

View File

@@ -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;