{"id":20955152,"url":"https://github.com/bryik/deno-parse-link-header","last_synced_at":"2025-12-28T13:38:02.388Z","repository":{"id":70396712,"uuid":"276987116","full_name":"bryik/deno-parse-link-header","owner":"bryik","description":"A Deno module for parsing HTTP Link headers.","archived":false,"fork":false,"pushed_at":"2020-07-12T13:57:24.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-19T23:32:48.714Z","etag":null,"topics":["deno","header","http","parser"],"latest_commit_sha":null,"homepage":"https://bryik.github.io/deno-parse-link-header/index.html","language":"TypeScript","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/bryik.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":"2020-07-03T21:04:39.000Z","updated_at":"2021-02-08T22:40:15.000Z","dependencies_parsed_at":"2023-04-24T19:47:11.787Z","dependency_job_id":null,"html_url":"https://github.com/bryik/deno-parse-link-header","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fdeno-parse-link-header","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fdeno-parse-link-header/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fdeno-parse-link-header/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bryik%2Fdeno-parse-link-header/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bryik","download_url":"https://codeload.github.com/bryik/deno-parse-link-header/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243351862,"owners_count":20276911,"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":["deno","header","http","parser"],"created_at":"2024-11-19T01:18:14.826Z","updated_at":"2025-12-28T13:38:02.321Z","avatar_url":"https://github.com/bryik.png","language":"TypeScript","readme":"# `deno-parse-link-header`\n\nThis is a Deno module for parsing HTTP Link headers.\n\nYes, [there are already a number of Node.js packages for parsing link headers](https://www.npmjs.com/search?q=parse%20link%20header); this module was mostly an excuse for me to try Deno and learn a little about a somewhat obscure HTTP header.\n\n## usage\n\nUse in Deno:\n\n```js\nimport { parseLinkHeader } from \"https://cdn.jsdelivr.net/gh/bryik/deno-parse-link-header@v0.1.1/parseLinkHeader.ts\";\n\nconst example = `\u003chttps://example.com\u003e; msg1=\"preconnect\" msg2=hello`;\n\nconst parsedLinkHeader = parseLinkHeader(example);\n\nconsole.log(parsedLinkHeader);\n// [{uri: \"https://example.com\", msg1: \"preconnect\", msg2: \"hello\"}]\n```\n\nUse in browser (import the ES Module `/dist/parseLinkHeader.bundle.js`):\n\n```html\n\u003cscript type=\"module\"\u003e\n  import { parseLinkHeader } from \"https://cdn.jsdelivr.net/gh/bryik/deno-parse-link-header@v0.1.1/dist/parseLinkHeader.bundle.js\";\n\n  const linkHeader = `\u003chttps://example.com\u003e; msg1=\"preconnect\" msg2=\"hello\"`;\n  console.log(parseLinkHeader(linkHeader));\n  // [{uri: \"https://example.com\", msg1: \"preconnect\", msg2: \"hello\"}]\n\u003c/script\u003e\n```\n\n## development\n\nFirst clone this repo and `cd` into it. You will need to have [deno](https://deno.land/) installed.\n\n### installation\n\n```bash\ndeno cache --reload --lock=lock.json ./deps.ts\n```\n\n### updating lock file\n\n```bash\ndeno cache --lock=lock.json --lock-write ./deps.ts\n```\n\n### running tests\n\n```bash\ndeno test\n```\n\n### building `/dist`\n\n```bash\ndeno bundle ./parseLinkHeader.ts ./dist/parseLinkHeader.bundle.js\n```\n\n## resources\n\n- MDN's article on [Link headers](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Link) provides a concise description of what a Link header is.\n\n- thlorenz' [parse-link-header](https://github.com/thlorenz/parse-link-header) node package was a useful reference and I re-used many of his test cases.\n\n- Section 3 of [RFC 8288](https://tools.ietf.org/html/rfc8288#section-3) is the definitive specification for Link headers. It is very dry.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Fdeno-parse-link-header","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbryik%2Fdeno-parse-link-header","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbryik%2Fdeno-parse-link-header/lists"}