1 | var baseIsMatch = require('./_baseIsMatch'),
|
2 | getMatchData = require('./_getMatchData'),
|
3 | matchesStrictComparable = require('./_matchesStrictComparable');
|
4 |
|
5 |
|
6 |
|
7 |
|
8 |
|
9 |
|
10 |
|
11 |
|
12 | function baseMatches(source) {
|
13 | var matchData = getMatchData(source);
|
14 | if (matchData.length == 1 && matchData[0][2]) {
|
15 | return matchesStrictComparable(matchData[0][0], matchData[0][1]);
|
16 | }
|
17 | return function(object) {
|
18 | return object === source || baseIsMatch(object, source, matchData);
|
19 | };
|
20 | }
|
21 |
|
22 | module.exports = baseMatches;
|