(params: Record<string, string>)
| 111 | }; |
| 112 | |
| 113 | export const objectToQueryParams = (params: Record<string, string>): string => { |
| 114 | const link = new URLSearchParams(); |
| 115 | |
| 116 | Object.entries(params).forEach(([param, value]) => { |
| 117 | if (value === undefined || value === null) { |
| 118 | return; |
| 119 | } |
| 120 | |
| 121 | link.set(param, value); |
| 122 | }); |
| 123 | |
| 124 | return link.toString(); |
| 125 | }; |
| 126 | |
| 127 | export const link = { |
| 128 | post: { |
no outgoing calls
no test coverage detected