{"id":13555039,"url":"https://github.com/denosaurs/status","last_synced_at":"2025-10-25T13:31:16.602Z","repository":{"id":45256045,"uuid":"264385957","full_name":"denosaurs/status","owner":"denosaurs","description":"🗿 HTTP status utility for Deno. Based on Java Apache HttpStatus","archived":false,"fork":false,"pushed_at":"2023-01-05T17:05:36.000Z","size":22,"stargazers_count":15,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-30T01:22:23.224Z","etag":null,"topics":["deno","http","status"],"latest_commit_sha":null,"homepage":"https://deno.land/x/status","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/denosaurs.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}},"created_at":"2020-05-16T07:46:38.000Z","updated_at":"2023-11-11T23:52:40.000Z","dependencies_parsed_at":"2023-02-04T08:00:33.261Z","dependency_job_id":null,"html_url":"https://github.com/denosaurs/status","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fstatus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fstatus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fstatus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/denosaurs%2Fstatus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/denosaurs","download_url":"https://codeload.github.com/denosaurs/status/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238147600,"owners_count":19424291,"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","http","status"],"created_at":"2024-08-01T12:03:00.350Z","updated_at":"2025-10-25T13:31:16.278Z","avatar_url":"https://github.com/denosaurs.png","language":"TypeScript","readme":"# status\n\n[![Open Issues](https://img.shields.io/github/issues/denosaurs/status)](https://github.com/denosaurs/status)\n[![GitHub license](https://img.shields.io/github/license/denosaurs/status)](https://github.com/denosaurs/denom/blob/master/LICENSE)\n[![Deno Version](https://img.shields.io/badge/deno-1.0.0-informational)](https://deno.land)\n[![Deno Doc](https://doc.deno.land/badge.svg)](https://doc.deno.land/https/deno.land/x/status/mod.ts)\n\nHTTP codes and status utility for Deno. Based on\n[Java Apache HttpStatus](http://hc.apache.org/httpclient-3.x/apidocs/org/apache/commons/httpclient/HttpStatus.html)\n\n## API\n\n### status(code) and status.pretty(code)\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus(403); // =\u003e \"FORBIDDEN\"\nstatus(\"403\"); // =\u003e \"FORBIDDEN\"\nstatus.pretty(403); // =\u003e \"Forbidden\"\nstatus(306); // throws\n```\n\n### status(message)\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus(\"forbidden\"); // =\u003e 403\nstatus(\"FoRbIdDeN\"); // =\u003e 403\nstatus(\"foo\"); // throws\n```\n\n### status.codes\n\nArray of all the possible status codes.\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus.codes; // =\u003e [202, 502, 400, ...]\n```\n\n### status.code[code]\n\nMap of all the available codes. `message (string) -\u003e code (number)`\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus.code; // =\u003e { \"ACCEPTED\": 202, \"BAD_GATEWAY\": 502, \"BAD_REQUEST\": 400, ... }\nstatus.code[\"FORBIDDEN\"] = 403;\n```\n\n### status.message[msg]\n\nMap of all the available codes. `code (number) -\u003e message (string)`\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus.message; // =\u003e { 202: \"ACCEPTED\", 502: \"BAD_GATEWAY, 400: \"BAD_REQUEST\", ... }\nstatus.message[403] = \"FORBIDDEN\";\n```\n\n### status.empty[code]\n\nReturns `true` if a status code expects an empty body.\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus.empty[200]; // =\u003e undefined\nstatus.empty[204]; // =\u003e true\n```\n\n### status.redirect[code]\n\nReturns `true` if a status code is a valid redirect status.\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus.redirect[200]; // =\u003e undefined\nstatus.redirect[301]; // =\u003e true\n```\n\n### status.retry[code]\n\nReturns `true` if a status code hints that the request might be retried.\n\n```typescript\nimport { status } from \"https://deno.land/x/status/mod.ts\";\n\nstatus.retry[501]; // =\u003e undefined\nstatus.retry[503]; // =\u003e true\n```\n\n## other\n\n### contribution\n\nPull request and issues are very welcome. Code style is formatted with\n`deno fmt`.\n\n### inspiration\n\nThe project is inspired by the [statuses](https://github.com/jshttp/statuses)\nproject.\n","funding_links":[],"categories":["TypeScript","基础设施","Modules"],"sub_categories":["JAM Stack/静态站点","Online Playgrounds","Web utils","Assistants"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenosaurs%2Fstatus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdenosaurs%2Fstatus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdenosaurs%2Fstatus/lists"}