|
|
9 years ago | |
|---|---|---|
| .. | ||
| index.js | 9 years ago | |
| license | 9 years ago | |
| package.json | 9 years ago | |
| readme.md | 9 years ago | |
Node.js
http.STATUS_CODESponyfillPonyfill: A polyfill that doesn't overwrite the native method
The built-in list of HTTP status codes differ 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.
$ npm install --save node-status-codes
var nodeStatusCodes = require('node-status-codes');
console.log(nodeStatusCodes[200]);
//=> 'OK'
console.log(nodeStatusCodes[500]);
//=> 'Internal Server Error'
MIT © Sindre Sorhus