function mergeMatch(match1, match2) {
    var res = {
      placeholders: {} // Some matches may not have placeholders; this is OK

    };

    if (!match1.placeholders && !match2.placeholders) {
      return res;
    } else if (!match1.placeholders) {
      return match2;
    } else if (!match2.placeholders) {
      return match1;
    } // Placeholders with the same key must match exactly


    for (var key in match1.placeholders) {
      res.placeholders[key] = match1.placeholders[key];

      if (match2.placeholders.hasOwnProperty(key)) {
        if (!_exactMatch(match1.placeholders[key], match2.placeholders[key])) {
          return null;
        }
      }
    }

    for (var _key in match2.placeholders) {
      res.placeholders[_key] = match2.placeholders[_key];
    }

    return res;
  }
Returns the set union of two match-placeholders or null if there is a conflict.