{"id":32117417,"url":"https://github.com/httpland/accept-ranges-parser","last_synced_at":"2026-07-15T08:33:24.294Z","repository":{"id":148008550,"uuid":"619425137","full_name":"httpland/accept-ranges-parser","owner":"httpland","description":"HTTP Accept-Ranges header field parser","archived":false,"fork":false,"pushed_at":"2023-04-29T13:32:37.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-10-20T16:48:37.558Z","etag":null,"topics":["accept-ranges","bytes","deserializer","header","http","none","parse","parser","serialize","serializer","stringify"],"latest_commit_sha":null,"homepage":"https://deno.land/x/accept_ranges_parser","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/httpland.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2023-03-27T05:47:12.000Z","updated_at":"2023-03-27T11:05:57.000Z","dependencies_parsed_at":"2023-05-28T05:30:22.205Z","dependency_job_id":null,"html_url":"https://github.com/httpland/accept-ranges-parser","commit_stats":{"total_commits":15,"total_committers":2,"mean_commits":7.5,"dds":"0.33333333333333337","last_synced_commit":"ea50cd6812d6d94cb73b7ee6302511c60bbe54d2"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/httpland/accept-ranges-parser","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Faccept-ranges-parser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Faccept-ranges-parser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Faccept-ranges-parser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Faccept-ranges-parser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/httpland","download_url":"https://codeload.github.com/httpland/accept-ranges-parser/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/httpland%2Faccept-ranges-parser/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35498250,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-15T02:00:06.706Z","response_time":131,"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":["accept-ranges","bytes","deserializer","header","http","none","parse","parser","serialize","serializer","stringify"],"created_at":"2025-10-20T16:43:26.202Z","updated_at":"2026-07-15T08:33:24.289Z","avatar_url":"https://github.com/httpland.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# accept-ranges-parser\n\n[![deno land](http://img.shields.io/badge/available%20on-deno.land/x-lightgrey.svg?logo=deno)](https://deno.land/x/accept_ranges_parser)\n[![deno doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/accept_ranges_parser/mod.ts)\n[![GitHub release (latest by date)](https://img.shields.io/github/v/release/httpland/accept-ranges-parser)](https://github.com/httpland/accept-ranges-parser/releases)\n[![codecov](https://codecov.io/gh/httpland/accept-ranges-parser/branch/main/graph/badge.svg)](https://codecov.io/gh/httpland/accept-ranges-parser)\n[![GitHub](https://img.shields.io/github/license/httpland/accept-ranges-parser)](https://github.com/httpland/accept-ranges-parser/blob/main/LICENSE)\n\n[![test](https://github.com/httpland/accept-ranges-parser/actions/workflows/test.yaml/badge.svg)](https://github.com/httpland/accept-ranges-parser/actions/workflows/test.yaml)\n[![NPM](https://nodei.co/npm/@httpland/accept-ranges-parser.png?mini=true)](https://nodei.co/npm/@httpland/accept-ranges-parser/)\n\nHTTP Accept-Ranges header field parser.\n\nCompliant with\n[RFC 9110, 14.3. Accept-Ranges](https://www.rfc-editor.org/rfc/rfc9110#section-14.3).\n\n## Deserialization\n\nParses string into [AcceptRanges](#acceptranges).\n\n```ts\nimport { parseAcceptRanges } from \"https://deno.land/x/accept_ranges_parser@$VERSION/parse.ts\";\nimport { assertEquals } from \"https://deno.land/std/testing/asserts.ts\";\n\nassertEquals(parseAcceptRanges(`none`), [\"none\"]);\nassertEquals(parseAcceptRanges(`bytes, unknown`), [\"bytes\", \"unknown\"]);\n```\n\n### Throwing error\n\nThrows `SyntaxError` if the input is invalid\n[`\u003cAccept-Ranges\u003e`](https://www.rfc-editor.org/rfc/rfc9110#section-14.3-2)\nsyntax.\n\n```ts\nimport { parseAcceptRanges } from \"https://deno.land/x/accept_ranges_parser@$VERSION/parse.ts\";\nimport { assertThrows } from \"https://deno.land/std/testing/asserts.ts\";\n\nassertThrows(() =\u003e parseAcceptRanges(\"\u003cinvalid\u003e\"));\n```\n\n## Serialization\n\nSerialize string of array into string.\n\n```ts\nimport { stringifyAcceptRanges } from \"https://deno.land/x/accept_ranges_parser@$VERSION/stringify.ts\";\nimport { assertEquals } from \"https://deno.land/std/testing/asserts.ts\";\n\nassertEquals(stringifyAcceptRanges([\"bytes\"]), \"bytes\");\n```\n\n### Throwing error\n\nThrows `TypeError` if the element contains invalid\n[`\u003crange-unit\u003e`](https://www.rfc-editor.org/rfc/rfc9110#section-14.1-3) syntax.\n\n```ts\nimport { stringifyAcceptRanges } from \"https://deno.land/x/accept_ranges_parser@$VERSION/stringify.ts\";\nimport { assertThrows } from \"https://deno.land/std/testing/asserts.ts\";\n\nassertThrows(() =\u003e stringifyAcceptRanges([\"\u003cinvalid\u003e\", \"none\"]));\n```\n\n## AcceptRanges\n\n`AcceptRanges` is a subtype of array with the following characteristics.\n\n- It has one or more elements.\n- The elements are [Token](#token).\n\n### Token\n\nRepresents a character set that compliant with\n[RFC 9110, 5.6.2. Tokens](https://www.rfc-editor.org/rfc/rfc9110#section-5.6.2)\nas much as possible.\n\n## API\n\nAll APIs can be found in the\n[deno doc](https://doc.deno.land/https/deno.land/x/accept_ranges_parser/mod.ts).\n\n## License\n\nCopyright © 2023-present [httpland](https://github.com/httpland).\n\nReleased under the [MIT](./LICENSE) license\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttpland%2Faccept-ranges-parser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhttpland%2Faccept-ranges-parser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhttpland%2Faccept-ranges-parser/lists"}