This repository has been archived on 2026-03-06. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files

12 lines
264 B
JavaScript

function handleResponse(body, status = 200, headers = {}, response) {
if (body === null) {
return false;
}
headers["content-length"] = body.length.toString();
response.writeHead(status, headers).end(body);
return true;
}
export {
handleResponse
};