(headerValue: string | null | undefined)
| 14 | * Returns an empty array when the header is absent or empty. |
| 15 | */ |
| 16 | export function parseCallChain(headerValue: string | null | undefined): string[] { |
| 17 | if (!headerValue || !headerValue.trim()) { |
| 18 | return [] |
| 19 | } |
| 20 | return headerValue |
| 21 | .split(',') |
| 22 | .map((id) => id.trim()) |
| 23 | .filter(Boolean) |
| 24 | } |
| 25 | |
| 26 | /** |
| 27 | * Serializes a call chain array back into the header value format. |
no outgoing calls
no test coverage detected