status/lib/realvalues.js
Romein van Buren 1983f78fba
Initial commit
Signed-off-by: Romein van Buren <romein@vburen.nl>
2022-06-22 17:22:19 +02:00

22 lines
496 B
JavaScript

'use strict';
const realValueNames = {
httpstatus: 'HTTP status code',
body: 'Response body',
bodylength: 'Response body length',
ok: 'Response OK?',
redir: 'Redirected?',
restype: 'Response type',
};
const realValues = {
httpstatus: ({ res }) => res.status,
body: ({ body }) => body,
bodylength: ({ body }) => body.length,
ok: ({ res }) => res.ok,
redir: ({ res }) => res.redirected,
restype: ({ res }) => res.type,
};
module.exports = { realValueNames, realValues };