public/build/static/application.js
function matches(source) {
      source || (source = {});

      var props = keys(source),
          key = props[0],
          a = source[key];

      // fast path the common case of providing an object with a single
      // property containing a primitive value
      if (props.length == 1 && a === a && !isObject(a)) {
        return function(object) {
          if (!hasOwnProperty.call(object, key)) {
            return false;
          }
          var b = object[key];
          return a === b && (a !== 0 || (1 / a == 1 / b));
        };
      }
      return function(object) {
        var length = props.length,
            result = false;

        while (length--) {
          var key = props[length];
          if (!(result = hasOwnProperty.call(object, key) &&
                baseIsEqual(object[key], source[key], null, true))) {
            break;
          }
        }
        return result;
      };
    }
function matches(source) {
      source || (source = {});

      var props = keys(source),
          key = props[0],
          a = source[key];

      // fast path the common case of providing an object with a single
      // property containing a primitive value
      if (props.length == 1 && a === a && !isObject(a)) {
        return function(object) {
          if (!hasOwnProperty.call(object, key)) {
            return false;
          }
          var b = object[key];
          return a === b && (a !== 0 || (1 / a == 1 / b));
        };
      }
      return function(object) {
        var length = props.length,
            result = false;

        while (length--) {
          var key = props[length];
          if (!(result = hasOwnProperty.call(object, key) &&
                baseIsEqual(object[key], source[key], null, true))) {
            break;
          }
        }
        return result;
      };
    }
function matches ( source ) { source || ( source = { } ) ; var props = keys ( source ) , key = props [ 0 ] , a = source [ key ] ; // fast path the common case of providing an object with a single // property containing a primitive value if ( props . length == 1 && a === a && ! isObject ( a ) ) { return function ( object ) { if ( ! hasOwnProperty . call ( object , key ) ) { return false ; } var b = object [ key ] ; return a === b && ( a !== 0 || ( 1 / a == 1 / b ) ) ; } ; } return function ( object ) { var length = props . length , result = false ; while ( length -- ) { var key = props [ length ] ; if ( ! ( result = hasOwnProperty . call ( object , key ) && baseIsEqual ( object [ key ] , source [ key ] , null , true ) ) ) { break ; } } return result ; } ; }
Creates a "_.where" style function, which performs a deep comparison
between a given object and the `source` object, returning `true` if the
given object has equivalent property values, else `false`.

@static
@memberOf _
@category Utilities
@param {Object} source The object of property values to match.
@returns {Function} Returns the new function.
@example

var characters = [
{ 'name': 'fred',   'age': 40 },
{ 'name': 'barney', 'age': 36 }
];

var matchesAge = _.matches({ 'age': 36 });

_.filter(characters, matchesAge);
// => [{ 'name': 'barney', 'age': 36 }]

_.find(characters, matchesAge);
// => { 'name': 'barney', 'age': 36 }
Creates a _ . where style function which performs a deep comparison between a given object and the source object returning true if the given object has equivalent property values else false .