( route: string, params: URLSearchParams = new URLSearchParams() )
| 92 | } |
| 93 | |
| 94 | function createDataPath( |
| 95 | route: string, |
| 96 | params: URLSearchParams = new URLSearchParams() |
| 97 | ): string { |
| 98 | let relativePath = 'data' + route; |
| 99 | if (String(params)) { |
| 100 | const delimiter = route.includes('?') ? '&' : '?'; |
| 101 | relativePath += delimiter + String(params); |
| 102 | } |
| 103 | return relativePath; |
| 104 | } |
| 105 | |
| 106 | export function createSearchParam(params: QueryParams = {}): URLSearchParams { |
| 107 | const keys = Object.keys(params) |
no outgoing calls
no test coverage detected
searching dependent graphs…