(value: string, limit: number)
| 2961 | } |
| 2962 | |
| 2963 | function truncateText(value: string, limit: number): string { |
| 2964 | if (value.length <= limit) { |
| 2965 | return value; |
| 2966 | } |
| 2967 | return `${value.slice(0, Math.max(0, limit - 3)).trimEnd()}...`; |
| 2968 | } |
| 2969 | |
| 2970 | async function readJsonBody(request: IncomingMessage, maxBodyBytes: number): Promise<unknown> { |
| 2971 | const chunks: Buffer[] = []; |
no outgoing calls
no test coverage detected