Repository URL to install this package:
|
Version:
2.0.0-beta.20 ▾
|
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
/**
* @todo needs some remaining props you can get by like .getHeaders() for example
*/
function fromReqResToDebug(reqOrRes) {
var _a = reqOrRes, locals = _a.locals, charset = _a.charset, headersSent = _a.headersSent, status = _a.status;
var _b = reqOrRes, _header = _b._header, data = _b.data, statusText = _b.statusText;
var _c = reqOrRes, protocol = _c.protocol, secure = _c.secure, ip = _c.ip, ips = _c.ips, subdomains = _c.subdomains, path = _c.path, hostname = _c.hostname, host = _c.host, xhr = _c.xhr, body = _c.body, cookies = _c.cookies, method = _c.method, params = _c.params, query = _c.query, route = _c.route, signedCookies = _c.signedCookies, originalUrl = _c.originalUrl, url = _c.url, baseUrl = _c.baseUrl, headers = _c.headers, statusCode = _c.statusCode;
var nonCircular = {
headers: headers,
data: data,
statusCode: statusCode,
status: status,
statusText: statusText,
_header: _header,
protocol: protocol,
secure: secure,
ip: ip,
ips: ips,
subdomains: subdomains,
path: path,
hostname: hostname,
host: host,
xhr: xhr,
body: body,
cookies: cookies,
method: method,
params: params,
query: query,
route: route,
signedCookies: signedCookies,
originalUrl: originalUrl,
url: url,
baseUrl: baseUrl,
// res
headersSent: headersSent,
locals: locals,
charset: charset,
};
return JSON.stringify(nonCircular, undefined, 2);
}
exports.fromReqResToDebug = fromReqResToDebug;
//# sourceMappingURL=fromReqResToDebug.js.map