function equalForKeys(a, b, keys) {
  if (!keys) {
    keys = [];
    for (var n in a) keys.push(n); // Used instead of Object.keys() for IE8 compatibility
  }

  for (var i=0; i<keys.length; i++) {
    var k = keys[i];
    if (a[k] != b[k]) return false; // Not '===', values aren't necessarily normalized
  }
  return true;
}
Performs a non-strict comparison of the subset of two objects, defined by a list of keys.

@param {Object} a The first object.
@param {Object} b The second object.
@param {Array} keys The list of keys within each object to compare. If the list is empty or not specified,
                    it defaults to the list of keys in `a`.
@return {Boolean} Returns `true` if the keys match, otherwise `false`.