(raw: string, allowReserved: boolean)
| 48 | const RESERVED_UNENCODED_RE = /[A-Za-z0-9\-._~:/?#[\]@!$&'()*+,;=]/; |
| 49 | |
| 50 | const encodeReservedAware = (raw: string, allowReserved: boolean): string => { |
| 51 | if (!allowReserved) return encodeURIComponent(raw); |
| 52 | // Walk char-by-char so the reserved set passes through as-is. |
| 53 | let out = ""; |
| 54 | for (const ch of raw) { |
| 55 | out += RESERVED_UNENCODED_RE.test(ch) ? ch : encodeURIComponent(ch); |
| 56 | } |
| 57 | return out; |
| 58 | }; |
| 59 | |
| 60 | const queryParamValues = (value: unknown, param: OperationParameter): string[] => { |
| 61 | if (value === undefined || value === null) return []; |
no outgoing calls
no test coverage detected