(baseURL: string, path: string, params = {})
| 4 | import type { Scanner, Searcher } from '~/types' |
| 5 | |
| 6 | export function buildURL(baseURL: string, path: string, params = {}): string { |
| 7 | const searchParams = new URLSearchParams(params) |
| 8 | const queryString: string = searchParams.toString() |
| 9 | |
| 10 | if (queryString === '') { |
| 11 | return `${baseURL}${path}` |
| 12 | } |
| 13 | return `${baseURL}${path}?${queryString}` |
| 14 | } |
| 15 | |
| 16 | export function base64fy(s: string): string { |
| 17 | return Base64.encode(s).trim() |
no outgoing calls
no test coverage detected