{"id":17446029,"url":"https://github.com/jamen/h2array","last_synced_at":"2026-03-09T02:31:17.603Z","repository":{"id":46808371,"uuid":"93969314","full_name":"jamen/h2array","owner":"jamen","description":"Create compact array trees resembling h() calls","archived":false,"fork":false,"pushed_at":"2021-09-24T10:18:01.000Z","size":3,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-09-25T01:31:08.535Z","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/jamen.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":"2017-06-10T22:43:45.000Z","updated_at":"2022-06-18T20:33:28.000Z","dependencies_parsed_at":"2022-08-20T09:22:07.071Z","dependency_job_id":null,"html_url":"https://github.com/jamen/h2array","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/jamen/h2array","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fh2array","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fh2array/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fh2array/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fh2array/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jamen","download_url":"https://codeload.github.com/jamen/h2array/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jamen%2Fh2array/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30280825,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T02:23:26.802Z","status":"ssl_error","status_checked_at":"2026-03-09T02:22:46.175Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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-17T18:21:01.608Z","updated_at":"2026-03-09T02:31:17.581Z","avatar_url":"https://github.com/jamen.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# h2array\n```js\n['header', [\n  ['h1', 'hello world'],\n  ['nav', [\n    ['a', { href: '/foo' }, 'foo'],\n    ['a', { href: '/bar' }, 'bar'],\n    ['a', { href: '/baz' }, 'baz']\n  ]]\n]]\n```\nThis module provides a variant of `h()` for storing calls as arrays, allowing you to serialize them as JSON for later use.\n\n## usage\n[![NPM](https://nodei.co/npm/h2array.png?mini)](https://www.npmjs.com/package/h2array)\n\n### `h(tag, attributes?, children?)`\nStores `tag`, `attributes`, and `children` in an array. Handles any missing arguments according to [`hyper2/h2spec`](https://github.com/hyper2/h2spec).\n```js\n\u003e const h = require('h2array')\n\u003e h('h1', 'hello world')\n['h1', null, 'hello world']\n```\n\n### `convert(h, node)`\nApplies `h` to `node` and all its children.\n```js\n\u003e const convert = require('h2array/convert')\n\u003e const h2ml = require('h2ml')\n\u003e const tree = ['h1', { style: 'color: red' }, 'hello world']\n\u003e convert(h2ml, tree)\n\"\u003ch1 style='color: red'\u003ehello world\u003c/h1\u003e\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fh2array","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjamen%2Fh2array","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjamen%2Fh2array/lists"}