Remove source initialization from matches.

This commit is contained in:
John-David Dalton
2014-04-12 01:02:58 -07:00
parent dd9e7cf665
commit 81cd990052

View File

@@ -7828,11 +7828,10 @@
* // => { 'name': 'barney', 'age': 36 }
*/
function matches(source) {
source || (source = {});
var props = keys(source),
propsLength = props.length,
key = props[0],
value = source[key];
value = propsLength && source[key];
// fast path the common case of providing an object with a single
// property containing a primitive value