(response: ServerResponse, status: number, body: JsonRecord)
| 3023 | } |
| 3024 | |
| 3025 | function writeJson(response: ServerResponse, status: number, body: JsonRecord): void { |
| 3026 | response.writeHead(status, { |
| 3027 | 'Content-Type': 'application/json; charset=utf-8', |
| 3028 | }); |
| 3029 | response.end(JSON.stringify(body)); |
| 3030 | } |
| 3031 | |
| 3032 | function rawString(value: unknown): string { |
| 3033 | return typeof value === 'string' ? value : ''; |
no outgoing calls
no test coverage detected