{
  "id": "task_libraries:html-parser/javascript",
  "path": "/exapedia/javascript-html-parser-libraries",
  "template": {
    "id": "task_libraries",
    "version": 4
  },
  "title": "JavaScript HTML parser libraries",
  "answer": [
    {
      "t": "text",
      "text": "JavaScript HTML parser libraries turn HTML text into a tree of nodes that code can query, change, and serialize. A full DOM implementation exposes browser APIs such as querySelector, while a lighter parser returns a plain tree or a stream of parse events. These libraries extract data from scraped pages, transform HTML in build pipelines, and run browser-style tests."
    }
  ],
  "breadcrumb": [
    {
      "label": "Tools"
    },
    {
      "label": "JavaScript HTML parser libraries"
    }
  ],
  "sections": [
    {
      "id": "libraries_popularity",
      "anchor": "popularity",
      "heading": "Popularity",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Monthly downloads",
            "Stars",
            "Last release",
            "License"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#parse",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F137"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F141"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsdom",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F157"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#htmlparser",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F165"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F169"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cheerio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F181"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#happy-dom",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F197"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#html-parse-stringify",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F207"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F211"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#hast-util-from-html",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F225"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F229"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#node-html-parser",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F247"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            ]
          ],
          "variant": "pop",
          "caption": [
            {
              "t": "text",
              "text": "Downloads: "
            },
            {
              "t": "text",
              "text": "npm"
            },
            {
              "t": "text",
              "text": ", last thirty days. Stars and releases: GitHub. Amber: no release in over a year."
            }
          ]
        }
      ],
      "note": [
        {
          "t": "link",
          "href": "#parse",
          "label": [
            {
              "t": "fact",
              "fact": "F137"
            }
          ]
        },
        {
          "t": "text",
          "text": " has the most monthly downloads in this comparison, at "
        },
        {
          "t": "fact",
          "fact": "F138"
        },
        {
          "t": "text",
          "text": "."
        }
      ]
    },
    {
      "id": "libraries_capabilities",
      "anchor": "capabilities",
      "heading": "Capabilities",
      "blocks": [
        {
          "b": "table",
          "columns": [
            "Library",
            "Native CSS selectors",
            "Original source offsets"
          ],
          "rows": [
            [
              [
                {
                  "t": "link",
                  "href": "#parse",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F137"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F145"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F146"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#jsdom",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F153"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F161"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F162"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#htmlparser",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F165"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F173"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F174"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#cheerio",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F177"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F185"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F186"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#happy-dom",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F193"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F203"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F204"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#html-parse-stringify",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F207"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F217"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F218"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#hast-util-from-html",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F225"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F235"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F236"
                }
              ]
            ],
            [
              [
                {
                  "t": "link",
                  "href": "#node-html-parser",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F243"
                    }
                  ]
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F253"
                }
              ],
              [
                {
                  "t": "fact",
                  "fact": "F254"
                }
              ]
            ]
          ],
          "variant": "cap"
        }
      ]
    },
    {
      "id": "libraries_entries",
      "anchor": "libraries",
      "heading": "Libraries",
      "blocks": [
        {
          "b": "entry",
          "anchor": "parse",
          "name": [
            {
              "t": "fact",
              "fact": "F137"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/inikulin/parse5"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/parse5"
            },
            {
              "label": "Docs",
              "href": "https://parse5.js.org/"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F12"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F138"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F144"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F140"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F139"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://parse5.js.org/",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F137"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F13"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F14"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F15"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F16"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F17"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F18"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F19"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F20"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F151"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F152"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/tt-a1i/archify",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F151"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "export function localizeHtml(html, { lang, page, cloudflare, copy = {} }) {\n  const tree = parseFragment(html);\n  function walk(node) {\n    const attrs = new Map((node.attrs || []).map(item => [item.name, item]));\n    const get = name => attrs.get(name)?.value;\n    const set = (name, value) => {\n      if (attrs.has(name)) attrs.get(name).value = value;\n      else { const attr = { name, value }; node.attrs.push(attr); attrs.set(name, attr); }\n    };\n    if (node.tagName === 'script' && get('src') === 'assets/site-language.js') {\n      node.parentNode.childNodes = node.parentNode.childNodes.filter(child => child !== node);\n      return;\n    }\n    const key = get('data-i18n') || get('data-i18n-html');\n    const value = key ? copy[lang]?.[key] : get(`data-${lang}`);\n    if (typeof value === 'string') {\n      // Only authored dictionary strings or explicit markup may contain HTML.\n      const markup = key || get('data-translation-html') !== undefined || page === 'gallery';\n      node.childNodes = markup ? parseFragment(value).childNodes : [{ nodeName: '#text', value, parentNode: node }];\n      for (const child of node.childNodes) child.parentNode = node;\n    }\n    const placeholder = copy[lang]?.[get('data-i18n-placeholder')];\n    if (typeof placeholder === 'string') set('placeholder', placeholder);\n    if (get('data-language-switch') !== undefined) {\n      set('href', localPagePath(page, lang === 'zh' ? 'en' : 'zh', cloudflare));\n      set('hreflang', lang === 'zh' ? 'en' : 'zh-Hans');\n      set('aria-label', lang === 'zh' ? 'Switch to English' : '切换到中文');\n      node.childNodes = [{ nodeName: '#text', value: lang === 'zh' ? 'EN' : '中文', parentNode: node }];\n    } else if (node.tagName === 'a') {\n      const href = get('href');\n      const match = href?.match(/^(?:(index|guide|start|gallery|community|agent-diagrams|compare|cases\\/mco-runtime)\\.html|(\\.\\/))([?#].*)?$/);\n      if (match) set('href', localPagePath(match[1] || 'index', lang, cloudflare) + (match[3] || ''));\n      else if (href?.startsWith('#')) set('href', localPagePath(page, lang, cloudflare) + href);\n    }\n    for (const child of [...(node.childNodes || [])]) walk(child);\n  }\n  walk(tree);\n  return serialize(tree);\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/tt-a1i/archify/blob/a7ed6fd6657da90414831d1d42cf95987188750c/website/src/data/localize-html.mjs#L4-L42",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F150"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20parse5%20to%20parse%2C%20inspect%20and%20transform%20HTML&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F137"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { parse } from 'parse5';\n\nconst document = parse('<p>Hello</p>');\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://cdn.jsdelivr.net/npm/parse5@8.1.1/dist/index.d.ts",
                  "label": [
                    {
                      "t": "text",
                      "text": "index.ts"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F142"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "jsdom",
          "name": [
            {
              "t": "fact",
              "fact": "F153"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/jsdom/jsdom"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/jsdom"
            },
            {
              "label": "Docs",
              "href": "https://raw.githubusercontent.com/jsdom/jsdom/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F38"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F154"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F160"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F156"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F155"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/jsdom/jsdom/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F153"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F39"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F40"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F41"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F42"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F43"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F44"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F45"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F46"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "const { JSDOM } = require('jsdom');\n\nconst dom = new JSDOM('<p>Hello</p>');\nconst text = dom.window.document.querySelector('p').textContent;\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://raw.githubusercontent.com/jsdom/jsdom/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20jsdom%20to%20parse%2C%20inspect%20and%20transform%20HTML&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F153"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F158"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "htmlparser",
          "name": [
            {
              "t": "fact",
              "fact": "F165"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/fb55/htmlparser2"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/htmlparser2"
            },
            {
              "label": "Docs",
              "href": "https://github.com/fb55/htmlparser2/blob/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F64"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F166"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F172"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F168"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F167"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/fb55/htmlparser2/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F165"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F65"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F66"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F67"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F68"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F69"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F70"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F71"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F72"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import { parseDocument } from 'htmlparser2';\n\nconst document = parseDocument('<p>Hello</p>');\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://cdn.jsdelivr.net/npm/htmlparser2@12.0.0/dist/index.d.ts",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20htmlparser2%20to%20parse%2C%20inspect%20and%20transform%20HTML&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F165"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F170"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "cheerio",
          "name": [
            {
              "t": "fact",
              "fact": "F177"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/cheeriojs/cheerio"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/cheerio"
            },
            {
              "label": "Docs",
              "href": "https://cheerio.js.org/docs/intro"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F91"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F178"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F184"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F180"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F179"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://cheerio.js.org/docs/intro",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F92"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F93"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F94"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F95"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F96"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F97"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F98"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F99"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F191"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F192"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchainjs",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F191"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "typescript",
              "code": "static async _scrape(\n    url: string,\n    caller: AsyncCaller,\n    timeout: number | undefined,\n    textDecoder?: TextDecoder,\n    options?: CheerioOptions\n  ): Promise<CheerioAPI> {\n    const { load } = await CheerioWebBaseLoader.imports();\n    const response = await caller.call(fetch, url, {\n      signal: timeout ? AbortSignal.timeout(timeout) : undefined,\n    });\n    const html =\n      textDecoder?.decode(await response.arrayBuffer()) ??\n      (await response.text());\n    return load(html, options);\n  }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/langchain-ai/langchainjs/blob/44ede93dd92e0515e56948f7b35a5fe0240e60bf/langchain/src/document_loaders/web/cheerio.ts#L96-L111",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F190"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=Projects%20using%20cheerio%20to%20parse%2C%20inspect%20and%20transform%20HTML&filters=%7B%22type%22%3A%20%22auto%22%2C%20%22numResults%22%3A%2010%2C%20%22includeDomains%22%3A%20%5B%22github.com%22%5D%7D",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F177"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "typescript",
              "code": "import * as cheerio from 'cheerio';\n\nconst $ = cheerio.load('<h1>Hello</h1>');\nconst text = $('h1').text();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://cheerio.js.org/docs/intro",
                  "label": [
                    {
                      "t": "text",
                      "text": "Readme.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F182"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "happy-dom",
          "name": [
            {
              "t": "fact",
              "fact": "F193"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/capricorn86/happy-dom"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/happy-dom"
            },
            {
              "label": "Docs",
              "href": "https://github.com/capricorn86/happy-dom/wiki/Browser"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F200"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F194"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F202"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F196"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F195"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/capricorn86/happy-dom/wiki/Browser",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F193"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F261"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F262"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F263"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F264"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F265"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F266"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { Window } from 'happy-dom';\n\nconst window = new Window();\nwindow.document.body.innerHTML = '<p>Hello</p>';\nconst text = window.document.querySelector('p').textContent;\nawait window.happyDOM.close();\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/capricorn86/happy-dom/wiki/Window",
                  "label": [
                    {
                      "t": "text",
                      "text": "Window.md"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=happy-dom%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "Find projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F193"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F198"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "html-parse-stringify",
          "name": [
            {
              "t": "fact",
              "fact": "F207"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/i18next/html-parse-stringify"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/html-parse-stringify"
            },
            {
              "label": "Docs",
              "href": "https://github.com/i18next/html-parse-stringify/blob/master/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F214"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F208"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F216"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F210"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F209"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/i18next/html-parse-stringify/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F207"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F267"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F268"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F269"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F270"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F271"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F272"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F223"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F224"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/drl990114/MarkFlowy",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F223"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "async () => {\n        return new Promise<string>((resolve) => {\n          let targetDoc: Node | string = otherProps.content\n\n          if (typeof targetDoc === 'string') {\n            targetDoc = createWysiwygDelegate(otherProps.delegateOptions).stringToDoc(targetDoc)\n          }\n\n          const html = prosemirrorNodeToHtml(targetDoc)\n\n          const fullAst = HTML.parse(html)\n\n          const imageLoadTasks: Promise<void>[] = []\n          const handleHtmlText = async (ast: HTMLAstNode[]) => {\n            const handleNode = (node: HTMLAstNode) => {\n              if (!node) {\n                return\n              }\n\n              if (\n                node.name === 'img' &&\n                node.attrs?.src &&\n                otherProps.delegateOptions?.handleViewImgSrcUrl\n              ) {\n                imageLoadTasks.push(\n                  (async () => {\n                    node.attrs.src = await otherProps.delegateOptions?.handleViewImgSrcUrl?.(\n                      node.attrs.src,\n                    )\n                    node.attrs.key = nanoid()\n                  })(),\n                )\n              }\n\n              if (node.children) {\n                handleHtmlText(node.children)\n              }\n            }\n\n            for (let i = 0; i < ast.length; i++) {\n              handleNode(ast[i])\n            }\n          }\n\n          handleHtmlText(fullAst)\n          Promise.all(imageLoadTasks)\n            .then(() => {\n              resolve(HTML.stringify(fullAst))\n            })\n            .catch(() => {\n              resolve(html)\n            })\n        })\n      }\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/drl990114/MarkFlowy/blob/fbf8c9be1d7cbce487750313c572af77415013e4/packages/editor/src/editor/components/Editor.tsx#L115-L168",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F222"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=html-parse-stringify%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F207"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import HTML from 'html-parse-stringify';\n\nconst nodes = HTML.parse('<p>Hello</p>');\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/i18next/html-parse-stringify/blob/master/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F212"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "hast-util-from-html",
          "name": [
            {
              "t": "fact",
              "fact": "F225"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/syntax-tree/hast-util-from-html"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/hast-util-from-html"
            },
            {
              "label": "Docs",
              "href": "https://github.com/syntax-tree/hast-util-from-html/blob/main/readme.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F273"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F226"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F234"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F228"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F227"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/syntax-tree/hast-util-from-html/blob/main/readme.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F225"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F274"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F275"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F276"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F277"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F278"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F279"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F241"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F242"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/rehypejs/rehype",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F241"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function parser(document, file) {\n  return fromHtml(document, {\n    ...settings,\n    onerror: emitParseErrors\n      ? function (message) {\n          if (file.path) {\n            message.name = file.path + ':' + message.name\n            message.file = file.path\n          }\n\n          file.messages.push(message)\n        }\n      : undefined\n  })\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/rehypejs/rehype/blob/cae74c7f729a55c6f407bdb95aaa362b44e7c2c2/packages/rehype-parse/lib/index.js#L54-L68",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F240"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=hast-util-from-html%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F225"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { fromHtml } from 'hast-util-from-html';\n\nconst tree = fromHtml('<p>Hello</p>', { fragment: true });\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/syntax-tree/hast-util-from-html/blob/main/readme.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "readme.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F230"
            }
          ]
        },
        {
          "b": "entry",
          "anchor": "node-html-parser",
          "name": [
            {
              "t": "fact",
              "fact": "F243"
            }
          ],
          "links": [
            {
              "label": "GitHub",
              "href": "https://github.com/taoqf/node-html-parser"
            },
            {
              "label": "npm",
              "href": "https://www.npmjs.com/package/node-html-parser"
            },
            {
              "label": "Docs",
              "href": "https://github.com/taoqf/node-html-parser/blob/main/README.md"
            }
          ],
          "what": [
            {
              "t": "fact",
              "fact": "F280"
            }
          ],
          "facts": [
            {
              "label": "Downloads / mo",
              "value": [
                {
                  "t": "fact",
                  "fact": "F244"
                }
              ]
            },
            {
              "label": "Stars",
              "value": [
                {
                  "t": "fact",
                  "fact": "F252"
                }
              ]
            },
            {
              "label": "Last release",
              "value": [
                {
                  "t": "fact",
                  "fact": "F246"
                }
              ]
            },
            {
              "label": "License",
              "value": [
                {
                  "t": "fact",
                  "fact": "F245"
                }
              ]
            },
            {
              "label": "Capabilities",
              "value": [
                {
                  "t": "link",
                  "href": "https://github.com/taoqf/node-html-parser/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "From the "
                    },
                    {
                      "t": "fact",
                      "fact": "F243"
                    },
                    {
                      "t": "text",
                      "text": " docs"
                    }
                  ]
                }
              ]
            }
          ],
          "pros": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F281"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F282"
                }
              ]
            },
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F283"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F284"
                }
              ]
            }
          ],
          "cons": [
            {
              "lead": [
                {
                  "t": "fact",
                  "fact": "F285"
                }
              ],
              "body": [
                {
                  "t": "fact",
                  "fact": "F286"
                }
              ]
            }
          ],
          "tabs": [
            {
              "label": [
                {
                  "t": "fact",
                  "fact": "F259"
                }
              ],
              "stars": [
                {
                  "t": "fact",
                  "fact": "F260"
                }
              ],
              "usedBy": [
                {
                  "t": "link",
                  "href": "https://github.com/Mintplex-Labs/anything-llm",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F259"
                    }
                  ]
                },
                {
                  "t": "text",
                  "text": " "
                }
              ],
              "language": "javascript",
              "code": "function resolveUrls(root, baseUrl) {\n  for (const a of root.querySelectorAll(\"a[href]\")) {\n    const href = a.getAttribute(\"href\");\n    if (!href || /^(https?:|mailto:|tel:|javascript:|#)/i.test(href)) continue;\n    try {\n      a.setAttribute(\"href\", new URL(href, baseUrl).toString());\n    } catch {}\n  }\n\n  for (const img of root.querySelectorAll(\"img[src]\")) {\n    const src = img.getAttribute(\"src\");\n    if (!src) {\n      img.remove();\n      continue;\n    }\n    if (src.startsWith(\"data:\")) {\n      img.remove();\n      continue;\n    }\n\n    const resolvedSrc = /^https?:/i.test(src)\n      ? src\n      : (() => {\n          try {\n            return new URL(src, baseUrl).toString();\n          } catch {\n            return src;\n          }\n        })();\n\n    if (IGNORED_IMG_BASEPATHS.some((base) => resolvedSrc.startsWith(base))) {\n      img.remove();\n      continue;\n    }\n\n    if (!/^https?:/i.test(src)) {\n      try {\n        img.setAttribute(\"src\", new URL(src, baseUrl).toString());\n      } catch {}\n    }\n\n    const alt = (img.getAttribute(\"alt\") || \"\").trim();\n    if (!alt) {\n      try {\n        const pathname = new URL(img.getAttribute(\"src\")).pathname;\n        const filename = pathname.split(\"/\").pop() || \"image\";\n        img.setAttribute(\"alt\", filename);\n      } catch {\n        img.setAttribute(\"alt\", \"image\");\n      }\n    }\n  }\n}\n",
              "prov": [
                {
                  "t": "link",
                  "href": "https://github.com/Mintplex-Labs/anything-llm/blob/2f6a451f55aca970311af2579088fe0c27af3ce8/collector/processLink/helpers/htmlToMarkdown.js#L423-L475",
                  "label": [
                    {
                      "t": "fact",
                      "fact": "F258"
                    }
                  ]
                }
              ],
              "more": [
                {
                  "t": "link",
                  "href": "https://dashboard.exa.ai/playground/search?q=node-html-parser%20GitHub%20projects",
                  "label": [
                    {
                      "t": "text",
                      "text": "More projects using "
                    },
                    {
                      "t": "fact",
                      "fact": "F243"
                    },
                    {
                      "t": "text",
                      "text": " →"
                    }
                  ]
                }
              ]
            },
            {
              "label": [
                {
                  "t": "text",
                  "text": "Quickstart"
                }
              ],
              "language": "javascript",
              "code": "import { parse } from 'node-html-parser';\n\nconst root = parse('<p>Hello</p>');\nconst text = root.querySelector('p').textContent;\n",
              "prov": [
                {
                  "t": "text",
                  "text": "From "
                },
                {
                  "t": "link",
                  "href": "https://github.com/taoqf/node-html-parser/blob/main/README.md",
                  "label": [
                    {
                      "t": "text",
                      "text": "README.md"
                    }
                  ]
                }
              ]
            }
          ],
          "install": [
            {
              "t": "fact",
              "fact": "F248"
            }
          ]
        }
      ]
    }
  ],
  "questions": [
    {
      "q": "Which JavaScript HTML parser should I use?",
      "a": [
        {
          "t": "fact",
          "fact": "F1"
        },
        {
          "t": "text",
          "text": " follows the HTML Living Standard and fits code that needs browser-accurate trees. Cheerio adds a jQuery-like API for selecting and editing elements. jsdom and Happy DOM supply a DOM with browser APIs, while "
        },
        {
          "t": "fact",
          "fact": "F53"
        },
        {
          "t": "text",
          "text": " emits parse events as markup arrives."
        }
      ]
    },
    {
      "q": "What is Cheerio?",
      "a": [
        {
          "t": "text",
          "text": "Cheerio parses HTML and XML and gives a jQuery-like API for traversing and changing the result. It does not render pages, load external resources, or run JavaScript."
        }
      ]
    },
    {
      "q": "What is jsdom?",
      "a": [
        {
          "t": "text",
          "text": "jsdom is a pure-JavaScript implementation of the WHATWG DOM and HTML standards for Node.js. It returns zeros for many layout properties and does not navigate when location.href changes."
        }
      ]
    },
    {
      "q": "jsdom vs Cheerio: which should I use?",
      "a": [
        {
          "t": "text",
          "text": "Cheerio parses markup into a tree with a jQuery-like API and skips rendering, CSS, and scripts. jsdom builds a browser-style DOM, with objects such as window and document.querySelector."
        }
      ]
    },
    {
      "q": "What is Happy DOM?",
      "a": [
        {
          "t": "text",
          "text": "Happy DOM implements a web browser without a graphical interface, including many WHATWG DOM and HTML standards. It works as a test environment for tools such as Vitest and Jest, and it runs scripts only when JavaScript evaluation is turned on."
        }
      ]
    },
    {
      "q": "Can Cheerio read content that page scripts create?",
      "a": [
        {
          "t": "text",
          "text": "No. Content that client-side scripts render never reaches Cheerio's tree, because Cheerio does not run JavaScript."
        }
      ]
    }
  ],
  "facts": {
    "F1": {
      "label": "Library name, parse5",
      "display": "parse5",
      "asOf": "2026-11-17"
    },
    "F2": {
      "label": "Monthly downloads, parse5",
      "display": "886.8M",
      "asOf": "2026-11-15"
    },
    "F3": {
      "label": "License, parse5",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F4": {
      "label": "Package release, parse5",
      "display": "8.1.1",
      "asOf": "2026-11-17"
    },
    "F5": {
      "label": "Undated package release, parse5",
      "display": "v8.1.1",
      "asOf": "2026-11-17"
    },
    "F6": {
      "label": "Repository stars, parse5",
      "display": "3.9K",
      "asOf": "2026-11-17"
    },
    "F7": {
      "label": "Source offsets, parse5",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F8": {
      "label": "Streaming input, parse5",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F9": {
      "label": "Fragment parsing, parse5",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F10": {
      "label": "Output formats, parse5",
      "display": "HTML",
      "asOf": "2026-11-17"
    },
    "F11": {
      "label": "Install, parse5",
      "display": "npm install parse5",
      "asOf": "2026-11-17"
    },
    "F12": {
      "label": "What it does, parse5",
      "display": "Parses and serializes HTML using the WHATWG HTML standard.",
      "asOf": "2026-11-17"
    },
    "F13": {
      "label": "strengths lead, parse5",
      "display": "Uses browser parsing rules",
      "asOf": "2026-11-17"
    },
    "F14": {
      "label": "strengths, parse5",
      "display": "Build HTML trees using the HTML Living Standard.",
      "asOf": "2026-11-17"
    },
    "F15": {
      "label": "strengths lead, parse5",
      "display": "Parses fragments with context",
      "asOf": "2026-11-17"
    },
    "F16": {
      "label": "strengths, parse5",
      "display": "Pass a context element to parse fragment content as innerHTML.",
      "asOf": "2026-11-17"
    },
    "F17": {
      "label": "limitations lead, parse5",
      "display": "Inserted nodes lack source locations",
      "asOf": "2026-11-17"
    },
    "F18": {
      "label": "limitations, parse5",
      "display": "Implicitly created tree-correction elements have undefined sourceCodeLocation.",
      "asOf": "2026-11-17"
    },
    "F19": {
      "label": "limitations lead, parse5",
      "display": "Streaming needs another package",
      "asOf": "2026-11-17"
    },
    "F20": {
      "label": "limitations, parse5",
      "display": "Install parse5-parser-stream for the streaming parser.",
      "asOf": "2026-11-17"
    },
    "F21": {
      "label": "Quickstart, parse5",
      "display": "const parse5 = require('parse5');\n\nconst documentFragment = parse5.parseFragment('<table></table>');\n\nconsole.log(documentFragment.childNodes[0].tagName); //> 'table'\n\n// Parses the html fragment in the context of the parsed <table> element.\nconst trFragment = parse5.parseFragment(documentFragment.childNodes[0], '<tr><td>Shake it, baby</td></tr>');\n\nconsole.log(trFragment.childNodes[0].childNodes[0].tagName); //> 'td'\n",
      "asOf": "2026-11-17"
    },
    "F22": {
      "label": "Project function, parse5",
      "display": "export function localizeHtml(html, { lang, page, cloudflare, copy = {} }) {\n  const tree = parseFragment(html);\n  function walk(node) {\n    const attrs = new Map((node.attrs || []).map(item => [item.name, item]));\n    const get = name => attrs.get(name)?.value;\n    const set = (name, value) => {\n      if (attrs.has(name)) attrs.get(name).value = value;\n      else { const attr = { name, value }; node.attrs.push(attr); attrs.set(name, attr); }\n    };\n    if (node.tagName === 'script' && get('src') === 'assets/site-language.js') {\n      node.parentNode.childNodes = node.parentNode.childNodes.filter(child => child !== node);\n      return;\n    }\n    const key = get('data-i18n') || get('data-i18n-html');\n    const value = key ? copy[lang]?.[key] : get(`data-${lang}`);\n    if (typeof value === 'string') {\n      // Only authored dictionary strings or explicit markup may contain HTML.\n      const markup = key || get('data-translation-html') !== undefined || page === 'gallery';\n      node.childNodes = markup ? parseFragment(value).childNodes : [{ nodeName: '#text', value, parentNode: node }];\n      for (const child of node.childNodes) child.parentNode = node;\n    }\n    const placeholder = copy[lang]?.[get('data-i18n-placeholder')];\n    if (typeof placeholder === 'string') set('placeholder', placeholder);\n    if (get('data-language-switch') !== undefined) {\n      set('href', localPagePath(page, lang === 'zh' ? 'en' : 'zh', cloudflare));\n      set('hreflang', lang === 'zh' ? 'en' : 'zh-Hans');\n      set('aria-label', lang === 'zh' ? 'Switch to English' : '切换到中文');\n      node.childNodes = [{ nodeName: '#text', value: lang === 'zh' ? 'EN' : '中文', parentNode: node }];\n    } else if (node.tagName === 'a') {\n      const href = get('href');\n      const match = href?.match(/^(?:(index|guide|start|gallery|community|agent-diagrams|compare|cases\\/mco-runtime)\\.html|(\\.\\/))([?#].*)?$/);\n      if (match) set('href', localPagePath(match[1] || 'index', lang, cloudflare) + (match[3] || ''));\n      else if (href?.startsWith('#')) set('href', localPagePath(page, lang, cloudflare) + href);\n    }\n    for (const child of [...(node.childNodes || [])]) walk(child);\n  }\n  walk(tree);\n  return serialize(tree);\n}\n",
      "asOf": "2026-11-17"
    },
    "F23": {
      "label": "Project function reference, parse5",
      "display": "localize-html.mjs · localizeHtml()",
      "asOf": "2026-11-17"
    },
    "F24": {
      "label": "Project repository, parse5",
      "display": "tt-a1i/archify",
      "asOf": "2026-11-17"
    },
    "F25": {
      "label": "Project stars, tt-a1i/archify",
      "display": "97.2K",
      "asOf": "2026-11-17"
    },
    "F26": {
      "label": "Project push date, tt-a1i/archify",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F27": {
      "label": "Library name, jsdom",
      "display": "jsdom",
      "asOf": "2026-11-17"
    },
    "F28": {
      "label": "Monthly downloads, jsdom",
      "display": "587.8M",
      "asOf": "2026-11-15"
    },
    "F29": {
      "label": "License, jsdom",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F30": {
      "label": "Package release, jsdom",
      "display": "31.0.1",
      "asOf": "2026-11-17"
    },
    "F31": {
      "label": "Undated package release, jsdom",
      "display": "v31.0.1",
      "asOf": "2026-11-17"
    },
    "F32": {
      "label": "Repository stars, jsdom",
      "display": "21.8K",
      "asOf": "2026-11-17"
    },
    "F33": {
      "label": "CSS selectors, jsdom",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F34": {
      "label": "Source offsets, jsdom",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F35": {
      "label": "Fragment parsing, jsdom",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F36": {
      "label": "Output formats, jsdom",
      "display": "HTML",
      "asOf": "2026-11-17"
    },
    "F37": {
      "label": "Install, jsdom",
      "display": "npm install jsdom",
      "asOf": "2026-11-17"
    },
    "F38": {
      "label": "What it does, jsdom",
      "display": "Provides DOM objects for working with parsed HTML in Node.js.",
      "asOf": "2026-11-17"
    },
    "F39": {
      "label": "strengths lead, jsdom",
      "display": "Exposes familiar DOM selectors",
      "asOf": "2026-11-17"
    },
    "F40": {
      "label": "strengths, jsdom",
      "display": "Use document.querySelector on the parsed document.",
      "asOf": "2026-11-17"
    },
    "F41": {
      "label": "strengths lead, jsdom",
      "display": "Retains optional source locations",
      "asOf": "2026-11-17"
    },
    "F42": {
      "label": "strengths, jsdom",
      "display": "Enable includeNodeLocations and retrieve positions with nodeLocation.",
      "asOf": "2026-11-17"
    },
    "F43": {
      "label": "limitations lead, jsdom",
      "display": "Layout measurements are incomplete",
      "asOf": "2026-11-17"
    },
    "F44": {
      "label": "limitations, jsdom",
      "display": "Layout-related properties can return zeros instead of browser measurements.",
      "asOf": "2026-11-17"
    },
    "F45": {
      "label": "limitations lead, jsdom",
      "display": "Link navigation stays unimplemented",
      "asOf": "2026-11-17"
    },
    "F46": {
      "label": "limitations, jsdom",
      "display": "Changing location.href does not create a new document.",
      "asOf": "2026-11-17"
    },
    "F47": {
      "label": "Quickstart, jsdom",
      "display": "const jsdom = require(\"jsdom\");\nconst { JSDOM } = jsdom;\n\nconst dom = new JSDOM(`<!DOCTYPE html><p>Hello world</p>`);\nconsole.log(dom.window.document.querySelector(\"p\").textContent); // \"Hello world\"\n",
      "asOf": "2026-11-17"
    },
    "F48": {
      "label": "Project function, jsdom",
      "display": "function analyzeDocument(html: string, hits: Map<string, SecretHit>): void {\n\tconst virtualConsole = new VirtualConsole();\n\tconst dom = new JSDOM(html, { virtualConsole });\n\tconst { document } = dom.window;\n\n\t// Markup with no whitespace between tags runs sibling text together in\n\t// `textContent`, where a match can span text the model never sees as one\n\t// token — and then nothing replaces it. Such a match still marks the page\n\t// sensitive, but it cannot become a credential.\n\tconst rendered = elementText(document.documentElement);\n\tfor (const hit of findRegexSecretHits(rendered)) collectHit(hits, hit);\n\tfor (const hit of findRegexSecretHits(document.documentElement.textContent ?? '')) {\n\t\tif (rendered.includes(hit.value)) continue; // the rendered pass has it, with a span we can trust\n\t\thit.captureBlocked = CONCATENATED_ONLY;\n\t\tcollectHit(hits, hit);\n\t}\n\n\t// Inputs/textareas that are password-shaped or whose label reads as a secret\n\t// expose their values in the collected HTML; no entropy needed to flag them.\n\tconst labelsByControlIdMap = getLabelTextByControlIdMap(document);\n\tfor (const field of Array.from(document.querySelectorAll('input, textarea'))) {\n\t\tconst sensitive =\n\t\t\tisSensitiveInput(field) ||\n\t\t\tSENSITIVE_FIELD_LABEL_PATTERN.test(\n\t\t\t\tgetAssociatedLabelText(field, document, labelsByControlIdMap),\n\t\t\t);\n\t\tif (!sensitive) continue;\n\t\tfor (const hit of sensitiveFieldHits(field)) collectHit(hits, hit);\n\t}\n\n\t// A console renders an issued credential as static text beside its label, with\n\t// no input to key off. A conservative first cut: div-soup rows, a second `dd`\n\t// under one `dt`, and `thead` column headers are all still uncovered.\n\tfor (const cell of Array.from(document.querySelectorAll('dd, td'))) {\n\t\tif (!isSecretLabelledCell(cell)) continue;\n\t\tfor (const hit of opaqueTokenCandidates(cell)) collectHit(hits, hit);\n\t}\n\n\t// Reveal dialogs are the high-risk flow: newly created credentials are often\n\t// rendered once with copy affordances and explanatory text.\n\t// Both signals read attributes or child controls rather than the dialog's own\n\t// text, so a dialog holding only the field and an icon-only copy control still\n\t// confirms. No text means no phrase and no entropy candidates, which the two\n\t// passes below already report as nothing.\n\tfor (const dialog of Array.from(document.querySelectorAll('[role=\"dialog\"], dialog[open]'))) {\n\t\tconst text = elementText(dialog);\n\t\tconst hasRevealPhrase = REVEAL_PHRASE_PATTERNS.some((pattern) => pattern.test(text));\n\t\tconst hasCopyButton = hasButtonMatching(dialog, COPY_BUTTON_PATTERN);\n\t\tif (!hasRevealPhrase && !hasCopyButton) continue;\n\t\tfor (const hit of highEntropyCandidates(text)) collectHit(hits, hit);\n\t\tfor (const hit of opaqueFieldValues(dialog)) collectHit(hits, hit);\n\t}\n\n\t// Product UIs frequently label secret containers with test IDs even when the\n\t// visible copy is locale-specific or absent.\n\tfor (const el of Array.from(\n\t\tdocument.querySelectorAll('[data-testid], [data-test-id], [data-test], [data-qa]'),\n\t)) {\n\t\tconst testId = getTestId(el);\n\t\tif (!testId || !SENSITIVE_TESTID_PATTERN.test(testId)) continue;\n\t\tif (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') continue;\n\t\tfor (const hit of highEntropyCandidates(elementText(el))) collectHit(hits, hit);\n\t}\n\n\t// aria-label/labelledby captures Stripe-style inline secret displays where\n\t// the sensitive context lives in accessibility metadata.\n\tfor (const el of Array.from(document.querySelectorAll('[aria-label], [aria-labelledby]'))) {\n\t\tif (el.tagName === 'INPUT' || el.tagName === 'TEXTAREA') continue;\n\t\tif (!SENSITIVE_ARIA_LABEL_PATTERN.test(elementLabel(el, document))) continue;\n\t\tfor (const hit of highEntropyCandidates(elementText(el))) collectHit(hits, hit);\n\t}\n\n\t// Non-dialog pages need both copy and reveal signals before we treat a\n\t// container as sensitive; this avoids redacting generic \"Copy URL\" widgets.\n\tfor (const button of Array.from(document.querySelectorAll('button, [role=\"button\"]'))) {\n\t\tconst label = button.getAttribute('aria-label')?.trim() ?? elementText(button);\n\t\tif (!label || !COPY_BUTTON_PATTERN.test(label)) continue;\n\t\tlet container = button.parentElement;\n\t\twhile (container?.parentElement && !hasButtonMatching(container, REVEAL_BUTTON_PATTERN)) {\n\t\t\tif (['FORM', 'SECTION', 'ASIDE', 'ARTICLE', 'MAIN'].includes(container.tagName)) break;\n\t\t\tcontainer = container.parentElement;\n\t\t}\n\t\tif (!container || container.matches('[role=\"dialog\"], dialog[open]')) continue;\n\t\tif (!hasButtonMatching(container, REVEAL_BUTTON_PATTERN)) continue;\n\t\tfor (const hit of highEntropyCandidates(elementText(container))) collectHit(hits, hit);\n\t\tfor (const hit of opaqueFieldValues(container)) collectHit(hits, hit);\n\t}\n\n\t// Monospace tokens inside a nearby sensitive ancestor are common in API-key\n\t// screens. Limit the ancestor walk so documentation code blocks stay clean.\n\tfor (const code of Array.from(document.querySelectorAll('code, pre, kbd'))) {\n\t\tlet cur = code.parentElement;\n\t\tlet depth = 0;\n\t\tlet confident = false;\n\t\twhile (cur && depth < 4 && !confident) {\n\t\t\tconst testId = getTestId(cur);\n\t\t\tconfident =\n\t\t\t\t(!!testId && SENSITIVE_TESTID_PATTERN.test(testId)) ||\n\t\t\t\tSENSITIVE_ARIA_LABEL_PATTERN.test(elementLabel(cur, document)) ||\n\t\t\t\thasButtonMatching(cur, COPY_BUTTON_PATTERN);\n\t\t\tcur = cur.parentElement;\n\t\t\tdepth++;\n\t\t}\n\t\tif (!confident) continue;\n\t\tfor (const hit of highEntropyCandidates(elementText(code))) collectHit(hits, hit);\n\t}\n}\n",
      "asOf": "2026-11-17"
    },
    "F49": {
      "label": "Project function reference, jsdom",
      "display": "analyze-html.ts · analyzeDocument()",
      "asOf": "2026-11-17"
    },
    "F50": {
      "label": "Project repository, jsdom",
      "display": "n8n-io/n8n",
      "asOf": "2026-11-17"
    },
    "F51": {
      "label": "Project stars, n8n-io/n8n",
      "display": "210.7K",
      "asOf": "2026-11-17"
    },
    "F52": {
      "label": "Project push date, n8n-io/n8n",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F53": {
      "label": "Library name, htmlparser2",
      "display": "htmlparser2",
      "asOf": "2026-11-17"
    },
    "F54": {
      "label": "Monthly downloads, htmlparser2",
      "display": "527.0M",
      "asOf": "2026-11-15"
    },
    "F55": {
      "label": "License, htmlparser2",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F56": {
      "label": "Package release, htmlparser2",
      "display": "12.0.0",
      "asOf": "2026-11-17"
    },
    "F57": {
      "label": "Undated package release, htmlparser2",
      "display": "v12.0.0",
      "asOf": "2026-11-17"
    },
    "F58": {
      "label": "Repository stars, htmlparser2",
      "display": "4.8K",
      "asOf": "2026-11-17"
    },
    "F59": {
      "label": "CSS selectors, htmlparser2",
      "display": "Via plugin",
      "asOf": "2026-11-17"
    },
    "F60": {
      "label": "Source offsets, htmlparser2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F61": {
      "label": "Streaming input, htmlparser2",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F62": {
      "label": "Output formats, htmlparser2",
      "display": "HTML",
      "asOf": "2026-11-17"
    },
    "F63": {
      "label": "Install, htmlparser2",
      "display": "npm install htmlparser2",
      "asOf": "2026-11-17"
    },
    "F64": {
      "label": "What it does, htmlparser2",
      "display": "Parses HTML and XML using event callbacks or a document tree.",
      "asOf": "2026-11-17"
    },
    "F65": {
      "label": "strengths lead, htmlparser2",
      "display": "Processes input in chunks",
      "asOf": "2026-11-17"
    },
    "F66": {
      "label": "strengths, htmlparser2",
      "display": "Feed markup through Parser.write before ending the input.",
      "asOf": "2026-11-17"
    },
    "F67": {
      "label": "strengths lead, htmlparser2",
      "display": "Serializes edited trees",
      "asOf": "2026-11-17"
    },
    "F68": {
      "label": "strengths, htmlparser2",
      "display": "Use the exported DomUtils.getOuterHTML to serialize changed HTML.",
      "asOf": "2026-11-17"
    },
    "F69": {
      "label": "limitations lead, htmlparser2",
      "display": "Browser tree rules differ",
      "asOf": "2026-11-17"
    },
    "F70": {
      "label": "limitations, htmlparser2",
      "display": "Choose parse5 when strict HTML specification compliance matters.",
      "asOf": "2026-11-17"
    },
    "F71": {
      "label": "limitations lead, htmlparser2",
      "display": "Text callbacks can split content",
      "asOf": "2026-11-17"
    },
    "F72": {
      "label": "limitations, htmlparser2",
      "display": "Join text pieces when one callback does not contain the whole section.",
      "asOf": "2026-11-17"
    },
    "F73": {
      "label": "Quickstart, htmlparser2",
      "display": "import * as htmlparser2 from \"htmlparser2\";\n\nconst parser = new htmlparser2.Parser({\n    onopentag(name, attributes) {\n        /*\n         * This fires when a new tag is opened.\n         *\n         * If you don't need an aggregated `attributes` object,\n         * have a look at the `onopentagname` and `onattribute` events.\n         */\n        if (name === \"script\" && attributes.type === \"text/javascript\") {\n            console.log(\"JS! Hooray!\");\n        }\n    },\n    ontext(text) {\n        /*\n         * Fires whenever a section of text was processed.\n         *\n         * Note that this can fire at any point within text and you might\n         * have to stitch together multiple pieces.\n         */\n        console.log(\"-->\", text);\n    },\n    onclosetag(tagname) {\n        /*\n         * Fires when a tag is closed.\n         *\n         * You can rely on this event only firing when you have received an\n         * equivalent opening tag before. Closing tags without corresponding\n         * opening tags will be ignored.\n         */\n        if (tagname === \"script\") {\n            console.log(\"That's it?!\");\n        }\n    },\n});\nparser.write(\n    \"Xyz <script type='text/javascript'>const foo = '<<bar>>';</script>\",\n);\nparser.end();\n",
      "asOf": "2026-11-17"
    },
    "F74": {
      "label": "Project function, htmlparser2",
      "display": "export function htmlTokenTransform(tokenizer: Tokenizer, tokens: Token[]): Token[] {\n\tconst output: Token[] = [];\n\n\t// hold a lazy buffer of text and process it only when necessary\n\tlet textBuffer = '';\n\n\tlet inCDATA = false;\n\n\tconst appendText = (text: string) => {\n\t\ttextBuffer += text;\n\t};\n\n\t// process the current text buffer w/ Markdoc's Tokenizer for tokens\n\tconst processTextBuffer = () => {\n\t\tif (textBuffer.length > 0) {\n\t\t\t// tokenize the text buffer to look for structural markup tokens\n\t\t\tconst toks = tokenizer.tokenize(textBuffer);\n\n\t\t\t// when we tokenize some raw text content, it's basically treated like Markdown, and will result in a paragraph wrapper, which we don't want\n\t\t\t// in this scenario, we just want to generate a text token, but, we have to tokenize it in case there's other structural markup\n\t\t\tif (toks.length === 3) {\n\t\t\t\tconst first = toks[0];\n\t\t\t\tconst second = toks[1];\n\t\t\t\tconst third: Token | undefined = toks.at(2);\n\n\t\t\t\tif (\n\t\t\t\t\tfirst.type === 'paragraph_open' &&\n\t\t\t\t\tsecond.type === 'inline' &&\n\t\t\t\t\tthird &&\n\t\t\t\t\tthird.type === 'paragraph_close' &&\n\t\t\t\t\tArray.isArray(second.children)\n\t\t\t\t) {\n\t\t\t\t\tfor (const tok of second.children as Token[]) {\n\t\t\t\t\t\t// if the given token is a 'text' token and its trimmed content is the same as the pre-tokenized text buffer, use the original\n\t\t\t\t\t\t// text buffer instead to preserve leading/trailing whitespace that is lost during tokenization of pure text content\n\t\t\t\t\t\tif (tok.type === 'text') {\n\t\t\t\t\t\t\tif (tok.content.trim() === textBuffer.trim()) {\n\t\t\t\t\t\t\t\ttok.content = textBuffer;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\toutput.push(tok);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// some other markup that happened to be 3 tokens, push tokens as-is\n\t\t\t\t\tfor (const tok of toks) {\n\t\t\t\t\t\toutput.push(tok);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// some other tokenized markup, push tokens as-is\n\t\t\t\tfor (const tok of toks) {\n\t\t\t\t\toutput.push(tok);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// reset the current lazy text buffer\n\t\t\ttextBuffer = '';\n\t\t}\n\t};\n\n\t// create an incremental HTML parser that tracks HTML tag open, close and text content\n\tconst parser = new Parser(\n\t\t{\n\t\t\toncdatastart() {\n\t\t\t\tinCDATA = true;\n\t\t\t},\n\n\t\t\toncdataend() {\n\t\t\t\tinCDATA = false;\n\t\t\t},\n\n\t\t\t// when an HTML tag opens...\n\t\t\tonopentag(name, attrs) {\n\t\t\t\t// process any buffered text to be treated as text node before the currently opening HTML tag\n\t\t\t\tprocessTextBuffer();\n\n\t\t\t\t// push an  'html-tag' 'tag_open' Markdoc node instance for the currently opening HTML tag onto the resulting Token stack\n\t\t\t\toutput.push({\n\t\t\t\t\ttype: 'tag_open',\n\t\t\t\t\tnesting: 1,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttag: 'html-tag',\n\t\t\t\t\t\tattributes: [\n\t\t\t\t\t\t\t{ type: 'attribute', name: 'name', value: name },\n\t\t\t\t\t\t\t{ type: 'attribute', name: 'attrs', value: attrs },\n\t\t\t\t\t\t],\n\t\t\t\t\t},\n\t\t\t\t} as Token);\n\t\t\t},\n\n\t\t\tontext(content: string | null | undefined) {\n\t\t\t\tif (inCDATA) {\n\t\t\t\t\t// ignore entirely while inside CDATA\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// only accumulate text into the buffer if we're not under an ignored HTML element\n\t\t\t\tif (typeof content === 'string') {\n\t\t\t\t\tappendText(content);\n\t\t\t\t}\n\t\t\t},\n\n\t\t\t// when an HTML tag closes...\n\t\t\tonclosetag(name) {\n\t\t\t\t// process any buffered text to be treated as a text node inside the currently closing HTML tag\n\t\t\t\tprocessTextBuffer();\n\n\t\t\t\t// push an 'html-tag' 'tag_close' Markdoc node instance for the currently closing HTML tag onto the resulting Token stack\n\t\t\t\toutput.push({\n\t\t\t\t\ttype: 'tag_close',\n\t\t\t\t\tnesting: -1,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\ttag: 'html-tag',\n\t\t\t\t\t\tattributes: [{ type: 'attribute', name: 'name', value: name }],\n\t\t\t\t\t},\n\t\t\t\t} as Token);\n\t\t\t},\n\t\t},\n\t\t{\n\t\t\tdecodeEntities: false,\n\t\t\trecognizeCDATA: true,\n\t\t\trecognizeSelfClosing: true,\n\t\t},\n\t);\n\n\t// for every detected token...\n\tfor (const token of tokens) {\n\t\t// if it was an HTML token, write the HTML text into the HTML parser\n\t\tif (token.type.startsWith('html')) {\n\t\t\t// as the parser encounters opening/closing HTML tags, it will push Markdoc Tag nodes into the output stack\n\t\t\tparser.write(token.content);\n\n\t\t\t// continue loop... IMPORTANT! we're throwing away the original 'html' tokens here (raw HTML strings), since the parser is inserting new ones based on the parsed HTML\n\t\t\tcontinue;\n\t\t}\n\n\t\t// process any child content for HTML\n\t\tif (token.type === 'inline') {\n\t\t\tif (token.children) {\n\t\t\t\ttoken.children = htmlTokenTransform(tokenizer, token.children);\n\t\t\t}\n\t\t}\n\n\t\t// not an HTML Token, preserve it at the current stack location\n\t\toutput.push(token);\n\t}\n\n\t// process any remaining buffered text\n\tprocessTextBuffer();\n\n\t//\n\t// post-process the current levels output Token[] array to un-wind this pattern:\n\t//\n\t// [\n\t//   { type: tag_open, meta.tag: html-tag },\n\t//   { type: paragraph_open },\n\t//   { type: inline, children [...] },\n\t//   { type: paragraph_close },\n\t//   { type: tag_close, meta.tag: html-tag }\n\t// ]\n\t//\n\t// the paragraph_open, inline, paragraph_close triplet needs to be replaced by the children of the inline node\n\t//\n\t// this is extra, unwanted paragraph wrapping unfortunately introduced by markdown-it during processing w/ HTML enabled\n\t//\n\n\tmutateAndCollapseExtraParagraphsUnderHtml(output);\n\n\treturn output;\n}\n",
      "asOf": "2026-11-17"
    },
    "F75": {
      "label": "Project function reference, htmlparser2",
      "display": "html-token-transform.ts · htmlTokenTransform()",
      "asOf": "2026-11-17"
    },
    "F76": {
      "label": "Project repository, htmlparser2",
      "display": "withastro/astro",
      "asOf": "2026-11-17"
    },
    "F77": {
      "label": "Project stars, withastro/astro",
      "display": "64.0K",
      "asOf": "2026-11-17"
    },
    "F78": {
      "label": "Project push date, withastro/astro",
      "display": "Nov 2026",
      "asOf": "2026-11-17"
    },
    "F79": {
      "label": "Library name, cheerio",
      "display": "Cheerio",
      "asOf": "2026-11-17"
    },
    "F80": {
      "label": "Monthly downloads, cheerio",
      "display": "134.2M",
      "asOf": "2026-11-15"
    },
    "F81": {
      "label": "License, cheerio",
      "display": "MIT",
      "asOf": "2026-11-17"
    },
    "F82": {
      "label": "Package release, cheerio",
      "display": "1.2.0",
      "asOf": "2026-11-17"
    },
    "F83": {
      "label": "Undated package release, cheerio",
      "display": "v1.2.0",
      "asOf": "2026-11-17"
    },
    "F84": {
      "label": "Repository stars, cheerio",
      "display": "30.5K",
      "asOf": "2026-11-17"
    },
    "F85": {
      "label": "CSS selectors, cheerio",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F86": {
      "label": "Source offsets, cheerio",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F87": {
      "label": "Streaming input, cheerio",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F88": {
      "label": "Fragment parsing, cheerio",
      "display": "Built-in",
      "asOf": "2026-11-17"
    },
    "F89": {
      "label": "Output formats, cheerio",
      "display": "HTML",
      "asOf": "2026-11-17"
    },
    "F90": {
      "label": "Install, cheerio",
      "display": "npm install cheerio",
      "asOf": "2026-11-17"
    },
    "F91": {
      "label": "What it does, cheerio",
      "display": "Parses HTML and XML with a jQuery-like selection and editing API.",
      "asOf": "2026-11-17"
    },
    "F92": {
      "label": "strengths lead, cheerio",
      "display": "Selects elements with CSS",
      "asOf": "2026-11-17"
    },
    "F93": {
      "label": "strengths, cheerio",
      "display": "Call the returned dollar function with a CSS selector.",
      "asOf": "2026-11-17"
    },
    "F94": {
      "label": "strengths lead, cheerio",
      "display": "Reads byte streams with encoding",
      "asOf": "2026-11-17"
    },
    "F95": {
      "label": "strengths, cheerio",
      "display": "Use decodeStream when the source encoding is unknown.",
      "asOf": "2026-11-17"
    },
    "F96": {
      "label": "limitations lead, cheerio",
      "display": "Client-rendered content stays absent",
      "asOf": "2026-11-17"
    },
    "F97": {
      "label": "limitations, cheerio",
      "display": "Cheerio does not execute the scripts that create client-rendered content.",
      "asOf": "2026-11-17"
    },
    "F98": {
      "label": "limitations lead, cheerio",
      "display": "Browser builds only load strings",
      "asOf": "2026-11-17"
    },
    "F99": {
      "label": "limitations, cheerio",
      "display": "Buffer, stream, and URL loaders require Node.js.",
      "asOf": "2026-11-17"
    },
    "F100": {
      "label": "Quickstart, cheerio",
      "display": "import * as cheerio from 'cheerio';\nconst $ = cheerio.load('<h2 class=\"title\">Hello world</h2>');\n\n$('h2.title').text('Hello there!');\n$('h2').addClass('welcome');\n\n$.html();\n//=> <html><head></head><body><h2 class=\"title welcome\">Hello there!</h2></body></html>\n",
      "asOf": "2026-11-17"
    },
    "F101": {
      "label": "Project function, cheerio",
      "display": "export const parseItem = (item: DataItem) =>\n    cache.tryGet(item.link!, async () => {\n        const response = await ofetch(item.link!, { headerGeneratorOptions: PRESETS.MODERN_WINDOWS_CHROME });\n        const $ = load(response);\n\n        const content = $('.article-detail');\n        content.find('.erphp-wppay, .copyright-message').remove();\n        item.author = $('.meta-author em').text().trim();\n        item.description = content.html()?.trim();\n\n        return item;\n    });\n",
      "asOf": "2026-11-17"
    },
    "F102": {
      "label": "Project function reference, cheerio",
      "display": "utils.ts · parseItem()",
      "asOf": "2026-11-17"
    },
    "F103": {
      "label": "Project repository, cheerio",
      "display": "DIYgod/RSSHub",
      "asOf": "2026-11-17"
    },
    "F104": {
      "label": "Project stars, DIYgod/RSSHub",
      "display": "47.1K",
      "asOf": "2026-11-17"
    },
    "F105": {
      "label": "Project push date, DIYgod/RSSHub",
      "display": "Nov 2026",
      "asOf": "2026-11-16"
    },
    "F106": {
      "label": "Developer need",
      "display": "Selecting and editing HTML elements",
      "asOf": "2026-11-17"
    },
    "F107": {
      "label": "Why choose cheerio",
      "display": "the familiar selector API",
      "asOf": "2026-11-17"
    },
    "F108": {
      "label": "Developer need in introduction",
      "display": "selecting and editing HTML elements",
      "asOf": "2026-11-17"
    },
    "F109": {
      "label": "When to consider jsdom",
      "display": "native DOM selectors fit the integration",
      "asOf": "2026-11-17"
    },
    "F110": {
      "label": "Developer need",
      "display": "Using DOM selectors on a document",
      "asOf": "2026-11-17"
    },
    "F111": {
      "label": "Why choose jsdom",
      "display": "the document.querySelector interface",
      "asOf": "2026-11-17"
    },
    "F112": {
      "label": "Developer need in introduction",
      "display": "using DOM selectors on a document",
      "asOf": "2026-11-17"
    },
    "F113": {
      "label": "When to consider cheerio",
      "display": "the selector and editing API is sufficient",
      "asOf": "2026-11-17"
    },
    "F114": {
      "label": "Developer need",
      "display": "Parsing HTML with browser rules",
      "asOf": "2026-11-17"
    },
    "F115": {
      "label": "Why choose parse5",
      "display": "HTML Living Standard tree construction",
      "asOf": "2026-11-17"
    },
    "F116": {
      "label": "Developer need in introduction",
      "display": "parsing HTML with browser rules",
      "asOf": "2026-11-17"
    },
    "F117": {
      "label": "When to consider htmlparser2",
      "display": "event callbacks are the required interface",
      "asOf": "2026-11-17"
    },
    "F118": {
      "label": "Developer need",
      "display": "Processing HTML in chunks",
      "asOf": "2026-11-17"
    },
    "F119": {
      "label": "Why choose htmlparser2",
      "display": "the event-driven Parser interface",
      "asOf": "2026-11-17"
    },
    "F120": {
      "label": "Developer need in introduction",
      "display": "processing HTML in chunks",
      "asOf": "2026-11-17"
    },
    "F121": {
      "label": "When to consider parse5",
      "display": "browser-standard tree construction matters",
      "asOf": "2026-11-17"
    },
    "F122": {
      "label": "Page introduction",
      "display": "JavaScript HTML parser libraries let developers read and select content from HTML documents.",
      "asOf": "2026-11-17"
    },
    "F123": {
      "label": "FAQ: Which JavaScript HTML parser supports CSS selectors?",
      "display": "Cheerio selects elements with a CSS selector through its returned dollar function.",
      "asOf": "2026-11-17"
    },
    "F124": {
      "label": "FAQ: Which JavaScript HTML parser supports CSS selectors?",
      "display": "htmlparser2 points to the separately installed css-select package for selector queries.",
      "asOf": "2026-11-17"
    },
    "F125": {
      "label": "FAQ: Can Cheerio read content generated by page scripts?",
      "display": "Cheerio does not execute JavaScript, so client-rendered single-page content stays absent.",
      "asOf": "2026-11-17"
    },
    "F126": {
      "label": "FAQ: Which Cheerio loader handles unknown byte encodings?",
      "display": "decodeStream accepts a stream of raw bytes when its encoding is unknown.",
      "asOf": "2026-11-17"
    },
    "F127": {
      "label": "FAQ: Are all Cheerio loaders available in the browser?",
      "display": "Only load is included in the browser build; buffer, stream, and URL loaders depend on Node.js.",
      "asOf": "2026-11-17"
    },
    "F128": {
      "label": "FAQ: How can Cheerio avoid adding document wrappers?",
      "display": "Pass false as the third load argument to parse a fragment without surrounding document structure.",
      "asOf": "2026-11-17"
    },
    "F129": {
      "label": "FAQ: Can jsdom provide browser layout measurements?",
      "display": "jsdom returns zeros for many layout-related properties rather than calculating browser layout.",
      "asOf": "2026-11-17"
    },
    "F130": {
      "label": "FAQ: Does changing jsdom location navigate to a new page?",
      "display": "jsdom does not implement navigation through location.href; the existing document remains.",
      "asOf": "2026-11-17"
    },
    "F131": {
      "label": "FAQ: Does jsdom execute scripts by default?",
      "display": "Embedded script execution is disabled by default.",
      "asOf": "2026-11-17"
    },
    "F132": {
      "label": "FAQ: How does parse5 handle a fragment context?",
      "display": "The context element makes the fragment parse as if assigned to that element’s innerHTML.",
      "asOf": "2026-11-17"
    },
    "F133": {
      "label": "FAQ: Do all parse5 nodes have source locations?",
      "display": "Enable sourceCodeLocationInfo for positions; implicitly inserted correction elements still have undefined locations.",
      "asOf": "2026-11-17"
    },
    "F134": {
      "label": "FAQ: Does htmlparser2 emit an entire text section at once?",
      "display": "The text callback can fire within a section, so applications need to stitch pieces together.",
      "asOf": "2026-11-17"
    },
    "F135": {
      "label": "FAQ: Which parsers serialize HTML after changes?",
      "display": "parse5 serialize turns an AST node into an HTML string.",
      "asOf": "2026-11-17"
    },
    "F136": {
      "label": "FAQ: Which parsers serialize HTML after changes?",
      "display": "jsdom serialize returns HTML document serialization including the doctype.",
      "asOf": "2026-11-17"
    },
    "F137": {
      "label": "Library name, parse5",
      "display": "parse5",
      "asOf": "2026-11-20"
    },
    "F138": {
      "label": "Monthly downloads, parse5",
      "display": "910.8M",
      "asOf": "2026-11-20"
    },
    "F139": {
      "label": "License, parse5",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F140": {
      "label": "Package release, parse5",
      "display": "8.1.1",
      "asOf": "2026-11-20"
    },
    "F141": {
      "label": "Package release date, parse5",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F142": {
      "label": "Install, parse5",
      "display": "npm install parse5",
      "asOf": "2026-11-20"
    },
    "F143": {
      "label": "Quickstart, parse5",
      "display": "import { parse } from 'parse5';\n\nconst document = parse('<p>Hello</p>');\n",
      "asOf": "2026-11-20"
    },
    "F144": {
      "label": "Repository stars, parse5",
      "display": "3.9K",
      "asOf": "2026-11-20"
    },
    "F145": {
      "label": "Native CSS selectors, parse5",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F146": {
      "label": "Original source offsets, parse5",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F147": {
      "label": "Parsing interface and output, parse5",
      "display": "HTML Living Standard document/fragment AST parsing and serialization; ParserStream is the same-engine I/O companion, not another independent HTML engine.",
      "asOf": "2026-11-20"
    },
    "F148": {
      "label": "First-call host and input requirements, parse5",
      "display": "[\"Use an ESM-capable runtime supported by selected8.1.1. parse returns an HTML AST/document, not a browser DOM or CSS-selector object. No scripts or resources are executed by this first parse.\"]",
      "asOf": "2026-11-20"
    },
    "F149": {
      "label": "Project function, parse5",
      "display": "export function localizeHtml(html, { lang, page, cloudflare, copy = {} }) {\n  const tree = parseFragment(html);\n  function walk(node) {\n    const attrs = new Map((node.attrs || []).map(item => [item.name, item]));\n    const get = name => attrs.get(name)?.value;\n    const set = (name, value) => {\n      if (attrs.has(name)) attrs.get(name).value = value;\n      else { const attr = { name, value }; node.attrs.push(attr); attrs.set(name, attr); }\n    };\n    if (node.tagName === 'script' && get('src') === 'assets/site-language.js') {\n      node.parentNode.childNodes = node.parentNode.childNodes.filter(child => child !== node);\n      return;\n    }\n    const key = get('data-i18n') || get('data-i18n-html');\n    const value = key ? copy[lang]?.[key] : get(`data-${lang}`);\n    if (typeof value === 'string') {\n      // Only authored dictionary strings or explicit markup may contain HTML.\n      const markup = key || get('data-translation-html') !== undefined || page === 'gallery';\n      node.childNodes = markup ? parseFragment(value).childNodes : [{ nodeName: '#text', value, parentNode: node }];\n      for (const child of node.childNodes) child.parentNode = node;\n    }\n    const placeholder = copy[lang]?.[get('data-i18n-placeholder')];\n    if (typeof placeholder === 'string') set('placeholder', placeholder);\n    if (get('data-language-switch') !== undefined) {\n      set('href', localPagePath(page, lang === 'zh' ? 'en' : 'zh', cloudflare));\n      set('hreflang', lang === 'zh' ? 'en' : 'zh-Hans');\n      set('aria-label', lang === 'zh' ? 'Switch to English' : '切换到中文');\n      node.childNodes = [{ nodeName: '#text', value: lang === 'zh' ? 'EN' : '中文', parentNode: node }];\n    } else if (node.tagName === 'a') {\n      const href = get('href');\n      const match = href?.match(/^(?:(index|guide|start|gallery|community|agent-diagrams|compare|cases\\/mco-runtime)\\.html|(\\.\\/))([?#].*)?$/);\n      if (match) set('href', localPagePath(match[1] || 'index', lang, cloudflare) + (match[3] || ''));\n      else if (href?.startsWith('#')) set('href', localPagePath(page, lang, cloudflare) + href);\n    }\n    for (const child of [...(node.childNodes || [])]) walk(child);\n  }\n  walk(tree);\n  return serialize(tree);\n}\n",
      "asOf": "2026-11-20"
    },
    "F150": {
      "label": "Project source file, parse5",
      "display": "website/src/data/localize-html.mjs",
      "asOf": "2026-11-20"
    },
    "F151": {
      "label": "Project full_name, parse5",
      "display": "tt-a1i/archify",
      "asOf": "2026-11-20"
    },
    "F152": {
      "label": "Project stargazers_count, parse5",
      "display": "97.2K",
      "asOf": "2026-11-20"
    },
    "F153": {
      "label": "Library name, jsdom",
      "display": "jsdom",
      "asOf": "2026-11-20"
    },
    "F154": {
      "label": "Monthly downloads, jsdom",
      "display": "603.4M",
      "asOf": "2026-11-20"
    },
    "F155": {
      "label": "License, jsdom",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F156": {
      "label": "Package release, jsdom",
      "display": "31.0.1",
      "asOf": "2026-11-20"
    },
    "F157": {
      "label": "Package release date, jsdom",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F158": {
      "label": "Install, jsdom",
      "display": "npm install jsdom",
      "asOf": "2026-11-20"
    },
    "F159": {
      "label": "Quickstart, jsdom",
      "display": "const { JSDOM } = require('jsdom');\n\nconst dom = new JSDOM('<p>Hello</p>');\nconst text = dom.window.document.querySelector('p').textContent;\n",
      "asOf": "2026-11-20"
    },
    "F160": {
      "label": "Repository stars, jsdom",
      "display": "21.8K",
      "asOf": "2026-11-20"
    },
    "F161": {
      "label": "Native CSS selectors, jsdom",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F162": {
      "label": "Original source offsets, jsdom",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F163": {
      "label": "Parsing interface and output, jsdom",
      "display": "Node web-platform/DOM objects with native selectors and configurable script/resource behavior; layout/navigation remain separate limitations.",
      "asOf": "2026-11-20"
    },
    "F164": {
      "label": "First-call host and input requirements, jsdom",
      "display": "[\"Supported Node runtime. This static fixture uses the default disabled embedded-script mode, with no resource loading, browser navigation, or layout guarantee.\"]",
      "asOf": "2026-11-20"
    },
    "F165": {
      "label": "Library name, htmlparser2",
      "display": "htmlparser2",
      "asOf": "2026-11-20"
    },
    "F166": {
      "label": "Monthly downloads, htmlparser2",
      "display": "542.3M",
      "asOf": "2026-11-20"
    },
    "F167": {
      "label": "License, htmlparser2",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F168": {
      "label": "Package release, htmlparser2",
      "display": "12.0.0",
      "asOf": "2026-11-20"
    },
    "F169": {
      "label": "Package release date, htmlparser2",
      "display": "Mar 2026",
      "asOf": "2026-11-20"
    },
    "F170": {
      "label": "Install, htmlparser2",
      "display": "npm install htmlparser2",
      "asOf": "2026-11-20"
    },
    "F171": {
      "label": "Quickstart, htmlparser2",
      "display": "import { parseDocument } from 'htmlparser2';\n\nconst document = parseDocument('<p>Hello</p>');\n",
      "asOf": "2026-11-20"
    },
    "F172": {
      "label": "Repository stars, htmlparser2",
      "display": "4.8K",
      "asOf": "2026-11-20"
    },
    "F173": {
      "label": "Native CSS selectors, htmlparser2",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F174": {
      "label": "Original source offsets, htmlparser2",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F175": {
      "label": "Parsing interface and output, htmlparser2",
      "display": "Forgiving HTML/XML event callbacks and domhandler trees; separately installed css-select handles CSS queries.",
      "asOf": "2026-11-20"
    },
    "F176": {
      "label": "First-call host and input requirements, htmlparser2",
      "display": "[\"Selected12 is ESM. parseDocument returns a domhandler Document tree; native callback streaming and separately installed CSS selectors are different surfaces. Parsed script text is data here, not application execution.\"]",
      "asOf": "2026-11-20"
    },
    "F177": {
      "label": "Library name, cheerio",
      "display": "Cheerio",
      "asOf": "2026-11-20"
    },
    "F178": {
      "label": "Monthly downloads, cheerio",
      "display": "138.0M",
      "asOf": "2026-11-20"
    },
    "F179": {
      "label": "License, cheerio",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F180": {
      "label": "Package release, cheerio",
      "display": "1.2.0",
      "asOf": "2026-11-20"
    },
    "F181": {
      "label": "Package release date, cheerio",
      "display": "Jan 2026",
      "asOf": "2026-11-20"
    },
    "F182": {
      "label": "Install, cheerio",
      "display": "npm install cheerio",
      "asOf": "2026-11-20"
    },
    "F183": {
      "label": "Quickstart, cheerio",
      "display": "import * as cheerio from 'cheerio';\n\nconst $ = cheerio.load('<h1>Hello</h1>');\nconst text = $('h1').text();\n",
      "asOf": "2026-11-20"
    },
    "F184": {
      "label": "Repository stars, cheerio",
      "display": "30.5K",
      "asOf": "2026-11-20"
    },
    "F185": {
      "label": "Native CSS selectors, cheerio",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F186": {
      "label": "Original source offsets, cheerio",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F187": {
      "label": "Parsing interface and output, cheerio",
      "display": "jQuery-style selectors and manipulation over loaded markup, using configured HTML/XML parser behavior rather than browser page execution.",
      "asOf": "2026-11-20"
    },
    "F188": {
      "label": "First-call host and input requirements, cheerio",
      "display": "[\"Supported Node/ESM or documented browser build. This string loader parses existing markup; it does not fetch a page, execute scripts, or recover client-rendered content.\"]",
      "asOf": "2026-11-20"
    },
    "F189": {
      "label": "Project function, cheerio",
      "display": "static async _scrape(\n    url: string,\n    caller: AsyncCaller,\n    timeout: number | undefined,\n    textDecoder?: TextDecoder,\n    options?: CheerioOptions\n  ): Promise<CheerioAPI> {\n    const { load } = await CheerioWebBaseLoader.imports();\n    const response = await caller.call(fetch, url, {\n      signal: timeout ? AbortSignal.timeout(timeout) : undefined,\n    });\n    const html =\n      textDecoder?.decode(await response.arrayBuffer()) ??\n      (await response.text());\n    return load(html, options);\n  }\n",
      "asOf": "2026-11-20"
    },
    "F190": {
      "label": "Project source file, cheerio",
      "display": "langchain/src/document_loaders/web/cheerio.ts",
      "asOf": "2026-11-20"
    },
    "F191": {
      "label": "Project full_name, cheerio",
      "display": "langchain-ai/langchainjs",
      "asOf": "2026-11-20"
    },
    "F192": {
      "label": "Project stargazers_count, cheerio",
      "display": "18.3K",
      "asOf": "2026-11-20"
    },
    "F193": {
      "label": "Library name, happy-dom",
      "display": "Happy DOM",
      "asOf": "2026-11-20"
    },
    "F194": {
      "label": "Monthly downloads, happy-dom",
      "display": "130.1M",
      "asOf": "2026-11-20"
    },
    "F195": {
      "label": "License, happy-dom",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F196": {
      "label": "Package release, happy-dom",
      "display": "21.0.4",
      "asOf": "2026-11-20"
    },
    "F197": {
      "label": "Package release date, happy-dom",
      "display": "Oct 2026",
      "asOf": "2026-11-20"
    },
    "F198": {
      "label": "Install, happy-dom",
      "display": "npm install happy-dom",
      "asOf": "2026-11-20"
    },
    "F199": {
      "label": "Quickstart, happy-dom",
      "display": "import { Window } from 'happy-dom';\n\nconst window = new Window();\nwindow.document.body.innerHTML = '<p>Hello</p>';\nconst text = window.document.querySelector('p').textContent;\nawait window.happyDOM.close();\n",
      "asOf": "2026-11-20"
    },
    "F200": {
      "label": "Official description, happy-dom",
      "display": "Implements a web browser without a graphical interface, including many WHATWG DOM and HTML standards.",
      "asOf": "2026-11-20"
    },
    "F201": {
      "label": "Quickstart source file, happy-dom",
      "display": "wiki/Window.md",
      "asOf": "2026-11-20"
    },
    "F202": {
      "label": "Repository stars, happy-dom",
      "display": "4.8K",
      "asOf": "2026-11-20"
    },
    "F203": {
      "label": "Native CSS selectors, happy-dom",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F204": {
      "label": "Original source offsets, happy-dom",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F205": {
      "label": "Parsing interface and output, happy-dom",
      "display": "Browser/DOM emulation without a graphical interface, including DOM selectors and HTML parsing; use explicit host policies for scripts/resources.",
      "asOf": "2026-11-20"
    },
    "F206": {
      "label": "First-call host and input requirements, happy-dom",
      "display": "[\"Supported Node/ESM runtime and Happy DOM Window host. The fixture is static markup without scripts/resources. Browser emulation does not make arbitrary untrusted input or script/resource policies equivalent to a pure inert AST parser.\"]",
      "asOf": "2026-11-20"
    },
    "F207": {
      "label": "Library name, html-parse-stringify",
      "display": "html-parse-stringify",
      "asOf": "2026-11-20"
    },
    "F208": {
      "label": "Monthly downloads, html-parse-stringify",
      "display": "92.9M",
      "asOf": "2026-11-20"
    },
    "F209": {
      "label": "License, html-parse-stringify",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F210": {
      "label": "Package release, html-parse-stringify",
      "display": "4.0.1",
      "asOf": "2026-11-20"
    },
    "F211": {
      "label": "Package release date, html-parse-stringify",
      "display": "Jul 2026",
      "asOf": "2026-11-20"
    },
    "F212": {
      "label": "Install, html-parse-stringify",
      "display": "npm install html-parse-stringify",
      "asOf": "2026-11-20"
    },
    "F213": {
      "label": "Quickstart, html-parse-stringify",
      "display": "import HTML from 'html-parse-stringify';\n\nconst nodes = HTML.parse('<p>Hello</p>');\n",
      "asOf": "2026-11-20"
    },
    "F214": {
      "label": "Official description, html-parse-stringify",
      "display": "Parses well-formed HTML, with every tag closed, into an AST and back.",
      "asOf": "2026-11-20"
    },
    "F215": {
      "label": "Quickstart source file, html-parse-stringify",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F216": {
      "label": "Repository stars, html-parse-stringify",
      "display": "3",
      "asOf": "2026-11-20"
    },
    "F217": {
      "label": "Native CSS selectors, html-parse-stringify",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F218": {
      "label": "Original source offsets, html-parse-stringify",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F219": {
      "label": "Parsing interface and output, html-parse-stringify",
      "display": "Small closed/well-formed-markup AST parse/stringify interface, with current4 typed tag/text/comment/component nodes and optional allowedTags/components.",
      "asOf": "2026-11-20"
    },
    "F220": {
      "label": "First-call host and input requirements, html-parse-stringify",
      "display": "[\"Supported JS module runtime. The package targets well-formed/closed-tag markup and returns its own AST, not a WHATWG browser DOM. Basic parsing is not a sanitization or universal malformed-HTML repair guarantee.\"]",
      "asOf": "2026-11-20"
    },
    "F221": {
      "label": "Project function, html-parse-stringify",
      "display": "async () => {\n        return new Promise<string>((resolve) => {\n          let targetDoc: Node | string = otherProps.content\n\n          if (typeof targetDoc === 'string') {\n            targetDoc = createWysiwygDelegate(otherProps.delegateOptions).stringToDoc(targetDoc)\n          }\n\n          const html = prosemirrorNodeToHtml(targetDoc)\n\n          const fullAst = HTML.parse(html)\n\n          const imageLoadTasks: Promise<void>[] = []\n          const handleHtmlText = async (ast: HTMLAstNode[]) => {\n            const handleNode = (node: HTMLAstNode) => {\n              if (!node) {\n                return\n              }\n\n              if (\n                node.name === 'img' &&\n                node.attrs?.src &&\n                otherProps.delegateOptions?.handleViewImgSrcUrl\n              ) {\n                imageLoadTasks.push(\n                  (async () => {\n                    node.attrs.src = await otherProps.delegateOptions?.handleViewImgSrcUrl?.(\n                      node.attrs.src,\n                    )\n                    node.attrs.key = nanoid()\n                  })(),\n                )\n              }\n\n              if (node.children) {\n                handleHtmlText(node.children)\n              }\n            }\n\n            for (let i = 0; i < ast.length; i++) {\n              handleNode(ast[i])\n            }\n          }\n\n          handleHtmlText(fullAst)\n          Promise.all(imageLoadTasks)\n            .then(() => {\n              resolve(HTML.stringify(fullAst))\n            })\n            .catch(() => {\n              resolve(html)\n            })\n        })\n      }\n",
      "asOf": "2026-11-20"
    },
    "F222": {
      "label": "Project source file, html-parse-stringify",
      "display": "packages/editor/src/editor/components/Editor.tsx",
      "asOf": "2026-11-20"
    },
    "F223": {
      "label": "Project full_name, html-parse-stringify",
      "display": "drl990114/MarkFlowy",
      "asOf": "2026-11-20"
    },
    "F224": {
      "label": "Project stargazers_count, html-parse-stringify",
      "display": "2.4K",
      "asOf": "2026-11-20"
    },
    "F225": {
      "label": "Library name, hast-util-from-html",
      "display": "hast-util-from-html",
      "asOf": "2026-11-20"
    },
    "F226": {
      "label": "Monthly downloads, hast-util-from-html",
      "display": "83.9M",
      "asOf": "2026-11-20"
    },
    "F227": {
      "label": "License, hast-util-from-html",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F228": {
      "label": "Package release, hast-util-from-html",
      "display": "2.1.0",
      "asOf": "2026-11-20"
    },
    "F229": {
      "label": "Package release date, hast-util-from-html",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F230": {
      "label": "Install, hast-util-from-html",
      "display": "npm install hast-util-from-html",
      "asOf": "2026-11-20"
    },
    "F231": {
      "label": "Quickstart, hast-util-from-html",
      "display": "import { fromHtml } from 'hast-util-from-html';\n\nconst tree = fromHtml('<p>Hello</p>', { fragment: true });\n",
      "asOf": "2026-11-20"
    },
    "F232": {
      "label": "Official description, hast-util-from-html",
      "display": "hast utility to parse from HTML",
      "asOf": "2026-11-20"
    },
    "F233": {
      "label": "Quickstart source file, hast-util-from-html",
      "display": "readme.md",
      "asOf": "2026-11-20"
    },
    "F234": {
      "label": "Repository stars, hast-util-from-html",
      "display": "42",
      "asOf": "2026-11-20"
    },
    "F235": {
      "label": "Native CSS selectors, hast-util-from-html",
      "display": "No",
      "asOf": "2026-11-20"
    },
    "F236": {
      "label": "Original source offsets, hast-util-from-html",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F237": {
      "label": "Parsing interface and output, hast-util-from-html",
      "display": "HTML-to-HAST parsing with HTML repair, positional metadata, and optional parse-error reporting for unified/unist processing.",
      "asOf": "2026-11-20"
    },
    "F238": {
      "label": "First-call host and input requirements, hast-util-from-html",
      "display": "[\"Supported ESM runtime. fragment:true parses a fragment rather than adding a full document wrapper. HAST AST nodes are not browser DOM objects or a native CSS-selector API.\"]",
      "asOf": "2026-11-20"
    },
    "F239": {
      "label": "Project function, hast-util-from-html",
      "display": "function parser(document, file) {\n  return fromHtml(document, {\n    ...settings,\n    onerror: emitParseErrors\n      ? function (message) {\n          if (file.path) {\n            message.name = file.path + ':' + message.name\n            message.file = file.path\n          }\n\n          file.messages.push(message)\n        }\n      : undefined\n  })\n}\n",
      "asOf": "2026-11-20"
    },
    "F240": {
      "label": "Project source file, hast-util-from-html",
      "display": "packages/rehype-parse/lib/index.js",
      "asOf": "2026-11-20"
    },
    "F241": {
      "label": "Project full_name, hast-util-from-html",
      "display": "rehypejs/rehype",
      "asOf": "2026-11-20"
    },
    "F242": {
      "label": "Project stargazers_count, hast-util-from-html",
      "display": "2.3K",
      "asOf": "2026-11-20"
    },
    "F243": {
      "label": "Library name, node-html-parser",
      "display": "node-html-parser",
      "asOf": "2026-11-20"
    },
    "F244": {
      "label": "Monthly downloads, node-html-parser",
      "display": "57.8M",
      "asOf": "2026-11-20"
    },
    "F245": {
      "label": "License, node-html-parser",
      "display": "MIT",
      "asOf": "2026-11-20"
    },
    "F246": {
      "label": "Package release, node-html-parser",
      "display": "9.0.7",
      "asOf": "2026-11-20"
    },
    "F247": {
      "label": "Package release date, node-html-parser",
      "display": "Nov 2026",
      "asOf": "2026-11-20"
    },
    "F248": {
      "label": "Install, node-html-parser",
      "display": "npm install node-html-parser",
      "asOf": "2026-11-20"
    },
    "F249": {
      "label": "Quickstart, node-html-parser",
      "display": "import { parse } from 'node-html-parser';\n\nconst root = parse('<p>Hello</p>');\nconst text = root.querySelector('p').textContent;\n",
      "asOf": "2026-11-20"
    },
    "F250": {
      "label": "Official description, node-html-parser",
      "display": "A very fast HTML parser, generating a simplified DOM, with basic element query support.",
      "asOf": "2026-11-20"
    },
    "F251": {
      "label": "Quickstart source file, node-html-parser",
      "display": "README.md",
      "asOf": "2026-11-20"
    },
    "F252": {
      "label": "Repository stars, node-html-parser",
      "display": "1.2K",
      "asOf": "2026-11-20"
    },
    "F253": {
      "label": "Native CSS selectors, node-html-parser",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F254": {
      "label": "Original source offsets, node-html-parser",
      "display": "Yes",
      "asOf": "2026-11-20"
    },
    "F255": {
      "label": "Parsing interface and output, node-html-parser",
      "display": "Simplified DOM parse/query/mutation with CSS selectors, serialization, and original string-range tuples on nodes; not a full browser engine.",
      "asOf": "2026-11-20"
    },
    "F256": {
      "label": "First-call host and input requirements, node-html-parser",
      "display": "[\"Supported runtime using the documented import/require entry. The fixed fixture contains p, so its query result exists. A simplified DOM with selectors is not a complete browser or universal HTML Living Standard conformance guarantee.\"]",
      "asOf": "2026-11-20"
    },
    "F257": {
      "label": "Project function, node-html-parser",
      "display": "function resolveUrls(root, baseUrl) {\n  for (const a of root.querySelectorAll(\"a[href]\")) {\n    const href = a.getAttribute(\"href\");\n    if (!href || /^(https?:|mailto:|tel:|javascript:|#)/i.test(href)) continue;\n    try {\n      a.setAttribute(\"href\", new URL(href, baseUrl).toString());\n    } catch {}\n  }\n\n  for (const img of root.querySelectorAll(\"img[src]\")) {\n    const src = img.getAttribute(\"src\");\n    if (!src) {\n      img.remove();\n      continue;\n    }\n    if (src.startsWith(\"data:\")) {\n      img.remove();\n      continue;\n    }\n\n    const resolvedSrc = /^https?:/i.test(src)\n      ? src\n      : (() => {\n          try {\n            return new URL(src, baseUrl).toString();\n          } catch {\n            return src;\n          }\n        })();\n\n    if (IGNORED_IMG_BASEPATHS.some((base) => resolvedSrc.startsWith(base))) {\n      img.remove();\n      continue;\n    }\n\n    if (!/^https?:/i.test(src)) {\n      try {\n        img.setAttribute(\"src\", new URL(src, baseUrl).toString());\n      } catch {}\n    }\n\n    const alt = (img.getAttribute(\"alt\") || \"\").trim();\n    if (!alt) {\n      try {\n        const pathname = new URL(img.getAttribute(\"src\")).pathname;\n        const filename = pathname.split(\"/\").pop() || \"image\";\n        img.setAttribute(\"alt\", filename);\n      } catch {\n        img.setAttribute(\"alt\", \"image\");\n      }\n    }\n  }\n}\n",
      "asOf": "2026-11-20"
    },
    "F258": {
      "label": "Project source file, node-html-parser",
      "display": "collector/processLink/helpers/htmlToMarkdown.js",
      "asOf": "2026-11-20"
    },
    "F259": {
      "label": "Project full_name, node-html-parser",
      "display": "Mintplex-Labs/anything-llm",
      "asOf": "2026-11-20"
    },
    "F260": {
      "label": "Project stargazers_count, node-html-parser",
      "display": "68.4K",
      "asOf": "2026-11-20"
    },
    "F261": {
      "label": "Simulates a browser or a window",
      "display": "Simulates a browser or a window",
      "asOf": "2026-11-17"
    },
    "F262": {
      "label": "The Browser class loads pages, while the Window class builds a DOM directly.",
      "display": "The Browser class loads pages, while the Window class builds a DOM directly.",
      "asOf": "2026-11-17"
    },
    "F263": {
      "label": "Supports custom elements",
      "display": "Supports custom elements",
      "asOf": "2026-11-17"
    },
    "F264": {
      "label": "Custom elements with declarative shadow DOM work inside the simulated document.",
      "display": "Custom elements with declarative shadow DOM work inside the simulated document.",
      "asOf": "2026-11-17"
    },
    "F265": {
      "label": "Scripts are off by default",
      "display": "Scripts are off by default",
      "asOf": "2026-11-17"
    },
    "F266": {
      "label": "Turn on JavaScript evaluation only for trusted code, because its VM contexts are not isolated.",
      "display": "Turn on JavaScript evaluation only for trusted code, because its VM contexts are not isolated.",
      "asOf": "2026-11-17"
    },
    "F267": {
      "label": "Round-trips HTML strings",
      "display": "Round-trips HTML strings",
      "asOf": "2026-11-17"
    },
    "F268": {
      "label": "Stringify turns the parsed AST back into the original HTML string.",
      "display": "Stringify turns the parsed AST back into the original HTML string.",
      "asOf": "2026-11-17"
    },
    "F269": {
      "label": "Powers the Trans component",
      "display": "Powers the Trans component",
      "asOf": "2026-11-17"
    },
    "F270": {
      "label": "The i18next community maintains it as the parser behind Trans in react-i18next.",
      "display": "The i18next community maintains it as the parser behind Trans in react-i18next.",
      "asOf": "2026-11-17"
    },
    "F271": {
      "label": "Requires closed tags",
      "display": "Requires closed tags",
      "asOf": "2026-11-17"
    },
    "F272": {
      "label": "Close or self-close every tag before parsing.",
      "display": "Close or self-close every tag before parsing.",
      "asOf": "2026-11-17"
    },
    "F273": {
      "label": "Turns HTML into a hast syntax tree.",
      "display": "Turns HTML into a hast syntax tree.",
      "asOf": "2026-11-17"
    },
    "F274": {
      "label": "Parses fragments or documents",
      "display": "Parses fragments or documents",
      "asOf": "2026-11-17"
    },
    "F275": {
      "label": "Set fragment to true to parse a snippet instead of a whole document.",
      "display": "Set fragment to true to parse a snippet instead of a whole document.",
      "asOf": "2026-11-17"
    },
    "F276": {
      "label": "Records detailed positions",
      "display": "Records detailed positions",
      "asOf": "2026-11-17"
    },
    "F277": {
      "label": "The verbose option records positions for attributes, start tags, and end tags.",
      "display": "The verbose option records positions for attributes, start tags, and end tags.",
      "asOf": "2026-11-17"
    },
    "F278": {
      "label": "Output is not sanitized",
      "display": "Output is not sanitized",
      "asOf": "2026-11-17"
    },
    "F279": {
      "label": "Run hast-util-sanitize on the tree before rendering user-provided HTML.",
      "display": "Run hast-util-sanitize on the tree before rendering user-provided HTML.",
      "asOf": "2026-11-17"
    },
    "F280": {
      "label": "Parses HTML into a simplified DOM tree with element queries.",
      "display": "Parses HTML into a simplified DOM tree with element queries.",
      "asOf": "2026-11-17"
    },
    "F281": {
      "label": "Supports querySelector",
      "display": "Supports querySelector",
      "asOf": "2026-11-17"
    },
    "F282": {
      "label": "Query the parsed tree with CSS selectors through querySelector.",
      "display": "Query the parsed tree with CSS selectors through querySelector.",
      "asOf": "2026-11-17"
    },
    "F283": {
      "label": "Serializes back to HTML",
      "display": "Serializes back to HTML",
      "asOf": "2026-11-17"
    },
    "F284": {
      "label": "Call toString on the root to write the tree back out as HTML.",
      "display": "Call toString on the root to write the tree back out as HTML.",
      "asOf": "2026-11-17"
    },
    "F285": {
      "label": "Some malformed HTML misparses",
      "display": "Some malformed HTML misparses",
      "asOf": "2026-11-17"
    },
    "F286": {
      "label": "Expect parse errors on some malformed HTML beyond common cases such as unclosed table cells.",
      "display": "Expect parse errors on some malformed HTML beyond common cases such as unclosed table cells.",
      "asOf": "2026-11-17"
    }
  },
  "dataCheckedAt": "2026-11-20",
  "agent": {
    "exaCall": {
      "endpoint": "/search",
      "body": {
        "query": "Best JavaScript HTML parser libraries Cheerio jsdom parse5 htmlparser2 code examples",
        "numResults": 5
      },
      "docsUrl": "https://exa.ai/docs/reference/search"
    },
    "calls": []
  }
}
