JSPM

node-status-codes

1.0.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 186263
  • Score
    100M100P100Q11760F
  • License MIT

Node.js `http.STATUS_CODES` ponyfill

Package Exports

  • node-status-codes

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (node-status-codes) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

node-status-codes Build Status

Node.js http.STATUS_CODES ponyfill

Ponyfill: 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.

Install

$ npm install --save node-status-codes

Usage

var nodeStatusCodes = require('node-status-codes');

console.log(nodeStatusCodes[200]);
//=> 'OK'

console.log(nodeStatusCodes[500]);
//=> 'Internal Server Error'

License

MIT © Sindre Sorhus