(body: CaptureRequest)
| 219 | } |
| 220 | |
| 221 | function resolveCapturedAt(body: CaptureRequest): string { |
| 222 | const capturedAt = body.source?.capturedAt |
| 223 | const date |
| 224 | = typeof capturedAt === 'number' && Number.isFinite(capturedAt) |
| 225 | ? new Date(capturedAt) |
| 226 | : new Date() |
| 227 | |
| 228 | return new Intl.DateTimeFormat('en-GB', { |
| 229 | day: '2-digit', |
| 230 | hour: '2-digit', |
| 231 | hour12: false, |
| 232 | minute: '2-digit', |
| 233 | month: 'short', |
| 234 | second: '2-digit', |
| 235 | timeZoneName: 'short', |
| 236 | year: 'numeric', |
| 237 | }).format(date) |
| 238 | } |
| 239 | |
| 240 | function createSourceDescription(body: CaptureRequest): string { |
| 241 | const title |
no outgoing calls
no test coverage detected