source: imaps-frontend/node_modules/lodash/_baseMatches.js

main
Last change on this file was 79a0317, checked in by stefan toskovski <stefantoska84@…>, 3 days ago

F4 Finalna Verzija

  • Property mode set to 100644
File size: 710 bytes
Line 
1var baseIsMatch = require('./_baseIsMatch'),
2 getMatchData = require('./_getMatchData'),
3 matchesStrictComparable = require('./_matchesStrictComparable');
4
5/**
6 * The base implementation of `_.matches` which doesn't clone `source`.
7 *
8 * @private
9 * @param {Object} source The object of property values to match.
10 * @returns {Function} Returns the new spec function.
11 */
12function 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
22module.exports = baseMatches;
Note: See TracBrowser for help on using the repository browser.