{"id":16125664,"url":"https://github.com/dy/hyperf","last_synced_at":"2025-09-12T18:31:36.316Z","repository":{"id":49397304,"uuid":"447768903","full_name":"dy/hyperf","owner":"dy","description":"Hypertext fragment builder","archived":false,"fork":false,"pushed_at":"2024-10-18T18:31:46.000Z","size":160,"stargazers_count":12,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-31T04:47:05.541Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/dy.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-13T22:18:16.000Z","updated_at":"2024-10-18T18:31:50.000Z","dependencies_parsed_at":"2024-09-28T15:00:38.929Z","dependency_job_id":"de5ce932-10a8-4c0b-aa11-cf276bc01a80","html_url":"https://github.com/dy/hyperf","commit_stats":{"total_commits":76,"total_committers":1,"mean_commits":76.0,"dds":0.0,"last_synced_commit":"d571401da82ebc813ab76c1667e09faf8d170186"},"previous_names":["spectjs/hyperf"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/dy/hyperf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fhyperf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fhyperf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fhyperf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fhyperf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dy","download_url":"https://codeload.github.com/dy/hyperf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dy%2Fhyperf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274855296,"owners_count":25362446,"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-09-12T02:00:09.324Z","response_time":60,"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":[],"created_at":"2024-10-09T21:30:31.496Z","updated_at":"2025-09-12T18:31:35.985Z","avatar_url":"https://github.com/dy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hyperf [![test](https://github.com/spectjs/hyperf/actions/workflows/test.yml/badge.svg)](https://github.com/spectjs/hyperf/actions/workflows/test.yml) [![npm version](https://img.shields.io/npm/v/hyperf)](http://npmjs.org/hyperf) [![size](https://img.shields.io/bundlephobia/minzip/hyperf?label=size)](https://bundlephobia.com/result?p=hyperf)\n\n\u003e Fast \u0026 tiny elements / fragments builder with reactivity support.\n\n#### _``const el = h`\u003cdiv foo=${foo}\u003e${bar}\u003c/div\u003e` ``_\n\nCreate an element (or document fragment) via [htm](https://github.com/developit/htm) tagged literal.\u003cbr/\u003e\nFields allow static values, async _Promise_, _Thenable_ or reactives _AsyncIterable_, _Observable_, _Signal_, see [sube](https://github.com/spectjs/sube).\n\n```js\nimport h from './hyperf.js'\nimport { signal } from '@preact/signals'\n\nconst text = signal('foo')\n\nconst a = h`\u003ca\u003e${ text }\u003c/a\u003e`\n// \u003ca\u003efoo\u003c/a\u003e\n\ntext.value = 'bar'\n// \u003ca\u003ebar\u003c/a\u003e\n\nconst frag = h`\u003cx ...${{x: 1}}\u003e1\u003c/x\u003e\u003cy\u003e2\u003c/y\u003e`\n\na.append(frag)\n// \u003ca\u003e\u003cx x=\"1\"\u003e1\u003c/x\u003e\u003cy\u003e2\u003c/y\u003e\u003c/a\u003e\n\ntext = null // cleanup refs/observables\n```\n\n#### _``const el = h(tag, attrs, ...content) ``_\n\n[Hyperscript](https://github.com/hyperhype/hyperscript) syntax support. To enable JSX just provide a directive for your builder (webpack or esbuild):\n\n```jsx\nimport React from 'hyperf'\n\nconst a1 = \u003ca\u003e...\u003c/a\u003e\nconst a2 = \u003ca\u003eContent: { value }\u003c/a\u003e\n\ndocument.querySelector('#container').append(a1, a2)\n```\n\n## Refs\n\n[jsx-dom](https://github.com/alex-kinokon/jsx-dom), [textsaur](https://github.com/ConnorJamesLow/texsaur), [lit-html](https://ghub.io/lit-html), [htm](https://ghub.io/htm), [htl](https://ghub.io/htl), [hyperscript](https://ghub.io/hyperscript), [incremental-dom](https://ghub.io/incremental-dom), [snabbdom](https://ghub.io/snabbdom), [nanomorph](https://ghub.io/nanomorph), [uhtml](https://ghub.io/uhtml), [uele](https://github.com/kethan/uele), [bruh](https://github.com/Technical-Source/bruh), [document-persistent-fragment](https://www.npmjs.com/package/document-persistent-fragment), [doma](https://github.com/fregante/doma), [domify](https://ghub.io/domify), [mini-jsx](https://github.com/remcohaszing/mini-jsx) and others.\n\n\n\u003cp align=\"center\"\u003eॐ\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fhyperf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdy%2Fhyperf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdy%2Fhyperf/lists"}