httpstatuses
v3.0.0
Published
Friendly interface for working with HTTP status codes
Downloads
28
Readme
HTTP Statuses
Plain-English interface for working with HTTP status codes.
Why?
The standard http
module provides a STATUS_CODES
object that returns a string describing the given status code. While this is quite useful, I want to go the opposite way with the goal of improving code readability.
Example
httpStatuses = require('httpstatuses')
console.log(httpStatuses.not_found) # 404
console.log(httpStatuses[404]) # Not Found
License
This software is released under the MIT license. You can find a copy in LICENSE.txt or at opensource.org.