tch });
      }
    }
  
    results.forEach(function (result) {
      result.relevance = relevance(result, searchString);
    });
    
    results = results.sort(function (a, b) { return b.relevance - a.relevance });

  }

  if (results.length > 50) {
    results = results.slice(0, 50);
  }
  
  this.displayResults(results);
}
Search.prototype.hideSearch = function () {
  this.$search.classList.remove('active');
}

Search.prototype.showSearch = function () {
  this.$search.classList.add('active');
}

Searc