koa-lite/lib/status.js
2013-08-17 00:15:57 -07:00

17 lines
259 B
JavaScript

/**
* Module dependencies.
*/
var http = require('http');
var codes = http.STATUS_CODES;
/**
* Produce exports[STATUS] = CODE map.
*/
Object.keys(codes).forEach(function(code){
var n = ~~code;
var s = codes[n].toLowerCase();
exports[s] = n;
});