{"id":23118534,"url":"https://github.com/tbjgolden/deno-htmlparser2","last_synced_at":"2025-08-16T23:31:34.840Z","repository":{"id":49053506,"uuid":"276704526","full_name":"tbjgolden/deno-htmlparser2","owner":"tbjgolden","description":"Deno port of `htmlparser2`","archived":false,"fork":false,"pushed_at":"2021-06-29T22:57:19.000Z","size":81,"stargazers_count":4,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-26T16:49:13.018Z","etag":null,"topics":["deno","html","html-parser","htmlparser2","parser"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbjgolden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-02T17:13:06.000Z","updated_at":"2024-04-28T15:22:17.000Z","dependencies_parsed_at":"2022-09-09T02:10:48.416Z","dependency_job_id":null,"html_url":"https://github.com/tbjgolden/deno-htmlparser2","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/tbjgolden/deno-htmlparser2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbjgolden%2Fdeno-htmlparser2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbjgolden%2Fdeno-htmlparser2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbjgolden%2Fdeno-htmlparser2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbjgolden%2Fdeno-htmlparser2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbjgolden","download_url":"https://codeload.github.com/tbjgolden/deno-htmlparser2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbjgolden%2Fdeno-htmlparser2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270785566,"owners_count":24644554,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-16T02:00:11.002Z","response_time":91,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","html","html-parser","htmlparser2","parser"],"created_at":"2024-12-17T05:18:11.364Z","updated_at":"2025-08-16T23:31:34.491Z","avatar_url":"https://github.com/tbjgolden.png","language":"TypeScript","readme":"# deno-htmlparser2\n\nDeno port of HTML Parser 2 (and its dependencies).\n\n```ts\n// direct\nimport { Parser } from \"https://rawcdn.githack.com/tbjgolden/deno-htmlparser2/451e3693f15dd2735283e65085edf3db94587d10/htmlparser2/index.ts\";\n\nconst parser = new Parser(\n  {\n    onopentag(name, attribs) {\n      if (name === \"script\" \u0026\u0026 attribs.type === \"text/javascript\") {\n        console.log(\"JS! Hooray!\");\n      }\n    },\n    ontext(text) {\n      console.log(\"--\u003e\", text);\n    },\n    onclosetag(tagname) {\n      if (tagname === \"script\") {\n        console.log(\"That's it?!\");\n      }\n    },\n    onend() {\n      console.log(\"Done\");\n    },\n  },\n  { decodeEntities: true },\n);\nparser.write(\n  \"Xyz \u003cscript type='text/javascript'\u003evar foo = '\u003c\u003cbar\u003e\u003e';\u003c/ script\u003e\",\n);\nparser.end();\n```\n\nlogs\n\n```\n--\u003e Xyz \nJS! Hooray!\n--\u003e var foo = '\n--\u003e \u003c\n--\u003e \u003cbar\u003e\u003e';\nThat's it?!\nDone\n```\n\nSee htmlparser2 for documentation and for any issues that are present in both this port and the original project.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbjgolden%2Fdeno-htmlparser2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbjgolden%2Fdeno-htmlparser2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbjgolden%2Fdeno-htmlparser2/lists"}