UNPKG

@js-thing/http-status-codes

Version:

Contains properly documented HTTP status code enums, reason phrases and helpers as defined in RFC

14 lines 500 B
import { HttpStatusCodes } from '../HttpStatusCodes'; import getReasonPhrase from './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 */ export default (function (statusCode) { return HttpStatusCodes[statusCode] ? statusCode + " " + getReasonPhrase(statusCode) : undefined; }); //# sourceMappingURL=getCompositeStatus.js.map