title: Lodash equals function
body: <p>I need to make several operations with given map:</p>
  
  <pre><code>var keys = {
    a: 1,
    b: 2,
    c: 1,
    d: 2,
    e: 2
  }
  _.findKey(keys, function(value) {
     return value === 2;
  }); // "b"
  _.omit(keys, function(value) {
     return value === 2;
  }); // {a: 1, c: 1}
  </code></pre>
  
  <p>I want to instantly create callbacks with comparison. Something like this</p>
  
  <pre><code>function equals(lhs) {
      return function(rhs) {
          return lhs === rhs;
      };
  }
  </code></pre>
  
  <p>Do the lodash or underscore have equivalent of this function? I've tried to make a callback by <code>_.matches(2)</code>, but it makes a deep compare and don't work on primitive types.</p>
  
  <p>Of course, I can create it by myself, but I am looking for a way to do it in a common way.</p>