A segment that is not valid percent-encoding is taken literally, never dropped.
(segment: string)
| 67 | |
| 68 | /** A segment that is not valid percent-encoding is taken literally, never dropped. */ |
| 69 | function decodeSegment(segment: string): string { |
| 70 | try { |
| 71 | return decodeURIComponent(segment); |
| 72 | } catch { |
| 73 | return segment; |
| 74 | } |
| 75 | } |
nothing calls this directly
no outgoing calls
no test coverage detected