readable-http-codes
Version:
0 dependency readable HTTP code enums, cleaning up your codebase!
11 lines (10 loc) • 435 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getStatusText = void 0;
var constants_1 = require("../constants");
var getStatusText = function (statusCode, hasPrefix) {
if (hasPrefix === void 0) { hasPrefix = false; }
var statusText = hasPrefix ? constants_1.statusTextMapWithPrefix : constants_1.statusTextMap;
return statusText[statusCode];
};
exports.getStatusText = getStatusText;