var domainRegexp = /^https:\/\/((learn.netdata).cloud|www.(netdata.cloud)|github.com\/netdata\/(netdata-cloud)|github.com\/netdata\/(netdata))/;
export var getResultsByKey = function getResultsByKey(results) {
  return results.reduce(function (acc, result) {
    var matched = result.url.raw.match(domainRegexp);
    var key = matched.find(function (s, i) {
      return i > 1 && s;
    });
    acc[key] = acc[key] || [];
    acc[key].push(result);
    return acc;
  }, {});
};