code: function compareObjects(obj1, obj2) {
            var value, name;
  
            for (name in obj1) {
              // Obj1 has item obj2 doesn't have
              if (obj1.hasOwnProperty(name)) {
                value = obj2[name];
  
                // Obj2 doesn't have obj1 item
                if (typeof value == "undefined") {
                  return false;
                }
  
                // Obj2 item has a different value
                if (obj1[name] != value) {
                  return false;
                }
  
                // Delete similar value
                delete obj2[name];
              }
            }
  
            // Check if obj 2 has something obj 1 doesn't have
            for (name in obj2) {
              // Obj2 has item obj1 doesn't have
              if (obj2.hasOwnProperty(name)) {
                return false;
              }
            }
  
            return true;
          }
docs: Compares two objects checks if it's key + value exists in the other one.
  
  @private
  @param {Object} obj1 First object to compare.
  @param {Object} obj2 Second object to compare.
  @return {boolean} True/false if the objects matches or not.