{"id":15293355,"url":"https://github.com/qpwo/table-to-record","last_synced_at":"2026-02-03T20:04:56.975Z","repository":{"id":57689500,"uuid":"493836125","full_name":"qpwo/table-to-record","owner":"qpwo","description":"Typescript microlibrary. Convert tables to well-typed records. Compactly store large json as tables. ","archived":false,"fork":false,"pushed_at":"2022-05-18T22:35:33.000Z","size":5,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-27T11:25:23.792Z","etag":null,"topics":["csv","json","record","table","typescript"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/table-to-record","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/qpwo.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":"2022-05-18T21:52:46.000Z","updated_at":"2025-10-06T13:16:58.000Z","dependencies_parsed_at":"2022-09-26T20:53:36.911Z","dependency_job_id":null,"html_url":"https://github.com/qpwo/table-to-record","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/qpwo/table-to-record","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qpwo%2Ftable-to-record","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qpwo%2Ftable-to-record/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qpwo%2Ftable-to-record/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qpwo%2Ftable-to-record/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/qpwo","download_url":"https://codeload.github.com/qpwo/table-to-record/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/qpwo%2Ftable-to-record/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29055640,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: 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":["csv","json","record","table","typescript"],"created_at":"2024-09-30T16:47:08.480Z","updated_at":"2026-02-03T20:04:56.960Z","avatar_url":"https://github.com/qpwo.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# table-to-record\n\nTypescript package to convert a table (rectangular array) to a well-typed record (aka object/map/dictionary) so you can concisely store data. (Instead of repeating yourself a million times in an enourmous json.)\n\n```sh\nnpm i table-to-record\n```\n\nUsage: `tableToRecord(rows, header, indexToKeyBy)`\n\n## Example\n\n```ts\nimport { tableToRecord } from 'table-to-record'\nconst header = ['uid', 'price', 'name', 'is_available'] as const\nconst rows = [\n    [888, 2, 'bread', false],\n    [999, 5, 'milk', true],\n] as const\nconst rec = tableToRecord(rows, header, '0')\n// has exact types!\nconst breadAvailable: true = rec[999].is_available\nconst _t: false = rec[888].is_available\n\nconsole.log(rec)\n/* Result:\n{\n    '888': { uid: 888, price: 2, name: '3', is_available: false },\n    '999': { uid: 999, price: 5, name: '6', is_available: true },\n}\n*/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqpwo%2Ftable-to-record","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqpwo%2Ftable-to-record","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqpwo%2Ftable-to-record/lists"}