(params: Record<string, string>)
| 73 | }; |
| 74 | |
| 75 | export const objectToQueryParams = (params: Record<string, string>): string => { |
| 76 | const link = new URLSearchParams(); |
| 77 | |
| 78 | Object.entries(params).forEach(([param, value]) => { |
| 79 | if (value === undefined || value === null) { |
| 80 | return; |
| 81 | } |
| 82 | |
| 83 | link.set(param, value); |
| 84 | }); |
| 85 | |
| 86 | return link.toString(); |
| 87 | }; |
| 88 | |
| 89 | export const link = { |
| 90 | post: { |
no outgoing calls
no test coverage detected