{"id":16125595,"url":"https://github.com/semibran/h","last_synced_at":"2025-07-25T21:15:33.907Z","repository":{"id":130492040,"uuid":"104918334","full_name":"semibran/h","owner":"semibran","description":"Create virtual DOM nodes","archived":false,"fork":false,"pushed_at":"2017-11-26T07:58:58.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T18:59:22.739Z","etag":null,"topics":["create","dom","h","html","nodes","virtual"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/semibran.png","metadata":{"files":{"readme":"readme.md","changelog":null,"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":"2017-09-26T17:42:11.000Z","updated_at":"2017-09-26T18:01:11.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcc56b48-4ad4-4bd0-95df-2fc12928b35e","html_url":"https://github.com/semibran/h","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/semibran%2Fh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/semibran","download_url":"https://codeload.github.com/semibran/h/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247485291,"owners_count":20946398,"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":["create","dom","h","html","nodes","virtual"],"created_at":"2024-10-09T21:30:05.761Z","updated_at":"2025-04-06T13:12:48.822Z","avatar_url":"https://github.com/semibran.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# h\n\u003e Create virtual DOM nodes\n\n## usage\n`h` uses the standard `h(tag, attributes, children)` signature. Note that `children`, if provided, is always an array to minimize type checks:\n```js\n\u003e h(\"div\", { class: \"foo\" }, [ \"hello world\" ])\n{\n  tag: \"div\",\n  attributes: { class: \"foo\" },\n  children: [ \"hello world\" ]\n}\n```\n\n`attributes` defaults to an empty object and thus can be omitted.\n```js\n\u003e h(\"h1\", [ \"title\" ])\n{\n  tag: \"h1\",\n  attributes: {},\n  children: [ \"title\" ]\n}\n```\n\nThe same principle applies to `children`, except with an empty array.\n```js\n\u003e h(\"br\")\n{\n  tag: \"br\",\n  attributes: {},\n  children: []\n}\n```\n\n## see also\n- [`semibran/manifest`](https://github.com/semibran/manifest) - turn virtual DOM nodes into real DOM elements\n\n## license\n[MIT](https://opensource.org/licenses/MIT) © [Brandon Semilla](https://git.io/semibran)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemibran%2Fh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsemibran%2Fh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsemibran%2Fh/lists"}