Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sindresorhus/node-status-codes
Node.js `http.STATUS_CODES` ponyfill
https://github.com/sindresorhus/node-status-codes
Last synced: 28 days ago
JSON representation
Node.js `http.STATUS_CODES` ponyfill
- Host: GitHub
- URL: https://github.com/sindresorhus/node-status-codes
- Owner: sindresorhus
- License: mit
- Created: 2015-07-26T22:55:43.000Z (almost 9 years ago)
- Default Branch: main
- Last Pushed: 2023-10-30T15:53:13.000Z (8 months ago)
- Last Synced: 2024-03-22T07:55:55.883Z (3 months ago)
- Language: JavaScript
- Size: 5.86 KB
- Stars: 35
- Watchers: 7
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
- License: license
- Security: .github/security.md
Lists
- awesome-nodejs-cn - node-status-codes - Node.js `http.STATUS_CODES` ponyfill. (Number / Polyfills)
- awesome-nodejs-precise - node-status-codes - status-codes .svg?style=social&label=Star&maxAge=2592000?style=flat-square)]() | Node.js <code>http.STATUS_CODES</code> ponyfill. | (Packages / Polyfills Node.js)
- awesome-nodejs - node-status-codes - Node.js `http.STATUS_CODES` ponyfill. (Number / Polyfills)
README
# Deprecated
This package is no longer relevant. The `http.STATUS_CODES` property is stable now.
---
# node-status-codes [![Build Status](https://travis-ci.org/sindresorhus/node-status-codes.svg?branch=master)](https://travis-ci.org/sindresorhus/node-status-codes)
> Node.js [`http.STATUS_CODES`](https://nodejs.org/api/http.html#http_http_status_codes) [ponyfill](https://ponyfill.com)
The built-in list of HTTP status codes [differ](https://github.com/nodejs/node/commit/8be6060020) between Node.js versions, so this is a good way to make sure it's consistent. Will be kept up to date with latest Node.js.
## Install
```
$ npm install --save node-status-codes
```## Usage
```js
var nodeStatusCodes = require('node-status-codes');console.log(nodeStatusCodes[200]);
//=> 'OK'console.log(nodeStatusCodes[500]);
//=> 'Internal Server Error'
```## License
MIT © [Sindre Sorhus](http://sindresorhus.com)