(headersString?: string)
| 397 | } |
| 398 | |
| 399 | function parseHeaderString(headersString?: string) { |
| 400 | let headers: Record<string, unknown> | null = null; |
| 401 | let isValidJSON = true; |
| 402 | |
| 403 | try { |
| 404 | if (headersString) { |
| 405 | headers = JSON.parse(headersString); |
| 406 | } |
| 407 | } catch { |
| 408 | isValidJSON = false; |
| 409 | } |
| 410 | return { headers, isValidJSON }; |
| 411 | } |
no test coverage detected
searching dependent graphs…