code: function textify(elems, filter, sep) {
    sep = sep || "";
    let ret = "";
    elems = filter(elems);
    const len = elems.length;
  
    for (let i = 0; i < len; i++) {
      let elem = elems[i];
      if (elem.type === "text") {
        ret += elem.data + sep;
      } else if (elem.children && elem.type !== "comment") {
        if (elem.name === "img" && elem.attribs.alt && elem.attribs.alt.length < 3) {
          // Javascript strings are UCS-2 or whatever, so it counts one emoji as 2ish chars
          ret += elem.attribs.alt;
        } else {
          ret += textify(elem.children, filter, sep);
        }
      }
    }
  
    return ret;
  }
docs: Modified/extended version of Cheerio's elems.text()