NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2955 most downloaded on npm
Constants enumerating the HTTP status codes. Based on the Java Apache HttpStatus API.
Last release 3 years ago
no release in 18 months
Release timing varies
gaps range from 8 days to 1.7 years
Some releases are documented
notes for 9 of 21 stable releases
Nothing withdrawn
no release was ever pulled
13 years old
40 releases · first in 2013
Adds 103 EARLY_HINTS per RFC 8297
Adds 421 MISDIRECTED_REQUEST per RFC 7540
MISDIRECTED_REQUEST per RFC 7540One column per quarter.
Nothing published for this version
Nothing published for this version
Introduced some non-breaking changes to the module in order to take better advantage of tree-shaking as suggested in #55 and #58.
Introduced some non-breaking changes to the module in order to take better advantage of tree-shaking as suggested in #55 and #58.
This should reduce file size for most users who are able to take advantage of tree shaking, especially those who are only using a subset of this library's features.
Thanks to @EvgenyOrekhov and @OliverJAsh for their suggestions and feedback on these issues.
https://bundlephobia.com/result?p=http-status-codes@2.1.4
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Fix an issue where the common.js bundle was not working with react native projects. #60 #56
Nothing published for this version
Exports ESM module for browser environments which fixes #56
Exports ESM module for browser environments which fixes #56
Provides a default export for additional backwards compatibility with v1 #54
Fixes a bug with the way the TypeScript definitions were being built. #52
Fixes a bug with the way the TypeScript definitions were being built. #52
Thanks to @Benno007 for finding and reporting this issue.
Adds a new status code: 451 Unavailable For Legal Reasons
451 Unavailable For Legal ReasonsThanks @ffflorian for this contribution.
http-status-codes v2 is mostly backwards compatible with v1. There is a single breaking change and two recommended changes.
This release marks a new major version of http-status-codes.
Improvements include:
Thanks to @seanmhanson for their help on this new version.
http-status-codes v2 is mostly backwards compatible with v1. There is a single breaking change and two recommended changes.
The reason phrase for the status code 500 has been changed from "Server Error" to "Internal Server Error". This is the correct phrase according to RFC7231. If you are migrating from v1, and have code that relies on the result of getStatusText(500) or getReasonPhrase('Server Error'), then this could affect you.
The function getStatusText has been renamed to getReasonPhrase. The old function is still available, but may be deprecated in a future version. To fix this simply rename instances of getStatusText() to getReasonPhrase(). The function is otherwise the same as it was before.
In http-status-codes v1, Status Codes were exported directly from the top-level module. i.e. HttpStatus.OK. In v2 all Status Codes live under an object called StatusCodes. i.e. HttpStatus.StatusCodes.OK. We made this change to cater to TypeScript users who prefer a dedicated value with an enum type. The previous values are still exported, but we won't continue to update them. Please migrate if you're using the old-style imports.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Add a getStatusCode function [#28]
getStatusCode function [#28]Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →