(value: string)
| 19 | * Returns null if the segment is empty or cannot be decoded. |
| 20 | */ |
| 21 | export function decodeIdSegment(value: string): string | null { |
| 22 | if (value.length === 0) return null; |
| 23 | try { |
| 24 | return decodeURIComponent(value); |
| 25 | } catch { |
| 26 | return null; |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | /** |
| 31 | * Build a compound ID from a prefix and encoded segments. |
no outgoing calls
no test coverage detected