UNPKG

rjweb-server

Version:

Easy and Robust Way to create a Web Server with Many Easy-to-use Features in NodeJS

9 lines (8 loc) 205 B
import { STATUS_CODES } from "http"; function parseStatus(code, message) { const parsed = `${code} ${message ?? STATUS_CODES[code] ?? "Unknown"}`; return parsed; } export { parseStatus as default };