MCPcopy
hub / github.com/lodash/lodash / baseMatches

Function baseMatches

lodash.js:3602–3610  ·  view source on GitHub ↗

* The base implementation of `_.matches` which doesn't clone `source`. * * @private * @param {Object} source The object of property values to match. * @returns {Function} Returns the new spec function.

(source)

Source from the content-addressed store, hash-verified

3600 * @returns {Function} Returns the new spec function.
3601 */
3602 function baseMatches(source) {
3603 var matchData = getMatchData(source);
3604 if (matchData.length == 1 && matchData[0][2]) {
3605 return matchesStrictComparable(matchData[0][0], matchData[0][1]);
3606 }
3607 return function(object) {
3608 return object === source || baseIsMatch(object, source, matchData);
3609 };
3610 }
3611
3612 /**
3613 * The base implementation of `_.matchesProperty` which doesn't clone `srcValue`.

Callers 2

baseIterateeFunction · 0.85
matchesFunction · 0.85

Calls 3

getMatchDataFunction · 0.85
matchesStrictComparableFunction · 0.85
baseIsMatchFunction · 0.85

Tested by

no test coverage detected