filter = (elems, term, show = true) => {
  const filteredElems = []
  let toggle = ['none', 'block']

  if (show) {
    toggle = toggle.reverse()
  }

  for (let i = elems.length - 1; i >= 0; i--) {
    const txt = elems[i].textContent.toLowerCase()
    if (txt.indexOf(term.toLowerCase()) !== -1) {
      elems[i].style.display = toggle[0]
      filteredElems.push(elems[i])
    } else {
      elems[i].style.display = toggle[1]
    }
  }

  return filteredElems
}
Hide or show an Array|HTMLCollection of elements containing a case-insensitive string
@param  {HTMLElement[]|HTMLCollection}   elems
@param  {string}  term  match textContent to this term
@param  {boolean} [show=true] show or hide elements
@return {HTMLElement[]}         filtered elements