{"id":21319243,"url":"https://github.com/cdellacqua/http-status.js","last_synced_at":"2025-03-15T22:21:38.276Z","repository":{"id":57100891,"uuid":"432146518","full_name":"cdellacqua/http-status.js","owner":"cdellacqua","description":"Enums for HTTP Status Codes and Messages","archived":false,"fork":false,"pushed_at":"2024-01-11T16:25:32.000Z","size":122,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-14T23:12:06.623Z","etag":null,"topics":["http"],"latest_commit_sha":null,"homepage":"","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/cdellacqua.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":"2021-11-26T10:58:02.000Z","updated_at":"2022-08-22T20:06:40.000Z","dependencies_parsed_at":"2024-01-11T19:49:20.872Z","dependency_job_id":"8c9a0fbc-be93-422d-9840-584f210e2f75","html_url":"https://github.com/cdellacqua/http-status.js","commit_stats":{"total_commits":17,"total_committers":1,"mean_commits":17.0,"dds":0.0,"last_synced_commit":"43c2dfef03b811b2fd8b7128a4cf638e57119334"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdellacqua%2Fhttp-status.js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdellacqua%2Fhttp-status.js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdellacqua%2Fhttp-status.js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdellacqua%2Fhttp-status.js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdellacqua","download_url":"https://codeload.github.com/cdellacqua/http-status.js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243797519,"owners_count":20349414,"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":["http"],"created_at":"2024-11-21T19:39:40.597Z","updated_at":"2025-03-15T22:21:38.254Z","avatar_url":"https://github.com/cdellacqua.png","language":"TypeScript","readme":"# Enums for HTTP Status Codes and Messages\n\n[NPM Package](https://www.npmjs.com/package/@cdellacqua/http-status)\n\n`npm install @cdellacqua/http-status`\n\n[Documentation](https://github.com/cdellacqua/http-status.js/blob/main/docs/README.md)\n\n## Highlights\n\n```js\nimport {HttpStatus, HttpStatusMessage} from '@cdellacqua/http-status';\n\nconsole.log(HttpStatus.OK); // 200\nconsole.log(HttpStatusMessage[301]); // \"Moved Permanently\"\nconsole.log(HttpStatusMessage[HttpStatus.MovedPermanently]); // \"Moved Permanently\"\n\n// It can be used to create expressive dispatch tables:\nconst dispatchTable = {\n\t[HttpStatus.OK]: async (response) =\u003e alert('here we go: ' + (await response.text())),\n\t[HttpStatus.InternalServerError]: () =\u003e alert('oops!'),\n\t[HttpStatus.BadRequest]: () =\u003e alert('mistakes were made...'),\n};\n\nfetch('/some-api.json').then((response) =\u003e {\n\tif (response.status in dispatchTable) {\n\t\tdispatchTable[response.status](response);\n\t} else {\n\t\talert('unhandled status! ' + response.status);\n\t}\n});\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdellacqua%2Fhttp-status.js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdellacqua%2Fhttp-status.js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdellacqua%2Fhttp-status.js/lists"}