{"id":17012393,"url":"https://github.com/lambdaurora/lib.html","last_synced_at":"2026-05-17T06:40:05.719Z","repository":{"id":240689901,"uuid":"803292876","full_name":"LambdAurora/lib.html","owner":"LambdAurora","description":"An HTML AST, parser, and writer library written in TypeScript. ","archived":false,"fork":false,"pushed_at":"2024-05-21T20:48:46.000Z","size":76,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-22T16:34:38.132Z","etag":null,"topics":["ast","deno","html","parser","typescript"],"latest_commit_sha":null,"homepage":"https://jsr.io/@lambdaurora/libhtml","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/LambdAurora.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-05-20T12:55:27.000Z","updated_at":"2024-06-09T23:39:39.970Z","dependencies_parsed_at":"2024-05-20T16:34:29.944Z","dependency_job_id":"8bec51b8-a0e0-46f7-88f0-9d96fc56fd3d","html_url":"https://github.com/LambdAurora/lib.html","commit_stats":null,"previous_names":["lambdaurora/lib.html"],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdAurora%2Flib.html","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdAurora%2Flib.html/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdAurora%2Flib.html/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/LambdAurora%2Flib.html/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/LambdAurora","download_url":"https://codeload.github.com/LambdAurora/lib.html/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244966462,"owners_count":20539794,"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","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":["ast","deno","html","parser","typescript"],"created_at":"2024-10-14T06:10:31.400Z","updated_at":"2025-10-24T13:16:04.979Z","avatar_url":"https://github.com/LambdAurora.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lib.html\n\n\u003cp align=\"center\"\u003e\n\t\u003cimg src=\"https://img.shields.io/badge/language-TS-9B599A.svg?style=flat-square\" alt=\"Language: TypeScript\" /\u003e\n\t\u003ca href=\"https://raw.githubusercontent.com/LambdAurora/lib.html/main/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/license-MPL%202.0-blue.svg?style=flat-square\" alt=\"GitHub license\" /\u003e\u003c/a\u003e\n\t\u003ca href=\"https://jsr.io/@lambdaurora/libhtml\"\u003e\u003cimg src=\"https://jsr.io/badges/@lambdaurora/libhtml?style=flat-square\" alt=\"JSR badge\" /\u003e\u003c/a\u003e\n\t\u003cimg src=\"https://shields.io/github/v/tag/LambdAurora/lib.html?sort=semver\u0026style=flat-square\" /\u003e\n\t\u003ca href=\"https://github.com/LambdAurora/lib.html/issues/\"\u003e\u003cimg src=\"https://img.shields.io/github/issues/LambdAurora/lib.html.svg?style=flat-square\" alt=\"GitHub issues\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\tAn HTML AST, parser, and writer library written in TypeScript.\n\u003c/p\u003e\n\n## Example\n\n```typescript\nimport * as html from \"@lambdaurora/libhtml\";\n\nconst div = html.parse(`\u003cdiv\u003e\n\t\u003ch1\u003eHello World!\u003c/h1\u003e\n\t\u003cp\u003e\n\t\tThis is a lovely HTML source.\n\t\u003c/p\u003e\n\u003c/div\u003e`) as html.Element;\n\ndiv.get_element_by_tag_name(\"h1\").text // Hello World!\n\nconst alert = html.create_element(\"div\")\n\t.with_child(html.create_element(\"h1\")\n\t\t.with_child(\"Alert: this is a lovely day!\")\n\t).with_child(html.create_element(\"p\")\n\t\t.with_child(\"Have a good day!\")\n\t);\n\nconst html_string = alert.html();\n\nconst dialog = html.dialog({\n\tchildren: [\n\t\thtml.h1([\"Hello world!\"]),\n\t\thtml.p([\"I hope you have a wonderful day!\"]),\n\t\thtml.button([\"Thank you\"])\n\t],\n\tattributes: {\n\t\topen: \"\"\n\t}\n});\n\nconst other_html_string = dialog.html();\n```\n\n## Usage\n\n### Deno\n\nAdd [the library from JSR](https://jsr.io/@lambdaurora/libhtml):\n\n```shell\ndeno add @lambdaurora/libhtml\n```\n\nThen import it:\n\n```typescript\nimport * as html from \"@lambdaurora/libhtml\";\n```\n\n### Web\n\nImport the library using [esm.sh](https://esm.sh):\n\n```javascript\nimport * as html from \"https://esm.sh/jsr/@lambdaurora/libhtml@1.3.2\";\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaurora%2Flib.html","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flambdaurora%2Flib.html","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flambdaurora%2Flib.html/lists"}