(value: Record<string, unknown> | null, keys: string[])
| 327 | } |
| 328 | |
| 329 | function readJsonNumber(value: Record<string, unknown> | null, keys: string[]): number | null { |
| 330 | if (!value) return null; |
| 331 | for (const key of keys) { |
| 332 | const next = value[key]; |
| 333 | if (typeof next === 'number' && Number.isInteger(next)) return next; |
| 334 | if (typeof next === 'string' && /^\d{3}$/.test(next.trim())) { |
| 335 | return Number.parseInt(next.trim(), 10); |
| 336 | } |
| 337 | } |
| 338 | return null; |
| 339 | } |
| 340 | |
| 341 | function readHeaders(line: string, json: Record<string, unknown> | null): string | undefined { |
| 342 | if (json) { |
no outgoing calls
no test coverage detected
searching dependent graphs…