@js-thing/http-status-codes
Version:
Contains properly documented HTTP status code enums, reason phrases and helpers as defined in RFC
19 lines • 770 B
JavaScript
;
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
var HttpStatusCodes_1 = require("../HttpStatusCodes");
var getReasonPhrase_1 = __importDefault(require("./getReasonPhrase"));
/**
* Get the complete HTTP Status with code and reason phrase for a given status code
*
* @param statusCode - e.g. 200
* @returns - `string` in `[StatusCode] [ReasonPhrase]` format
*/
exports.default = (function (statusCode) {
return HttpStatusCodes_1.HttpStatusCodes[statusCode]
? statusCode + " " + getReasonPhrase_1.default(statusCode)
: undefined;
});
//# sourceMappingURL=getCompositeStatus.js.map