function doSearch() {
  const searchStr = document.getElementById('searchInput').value;
  const tagList = document.getElementById('tagList').getElementsByClassName('tag-item');
  
  for (const tag of tagList) {
      const value = tag.querySelector('a').innerHTML;
     
      if (searchStr.length && value.toLowerCase().match(searchStr.toLowerCase())) {
          tag.classList.remove('visually-hidden');
      } else {
          tag.classList.add('visually-hidden');
      }
  }
}
