MCPcopy
hub / github.com/ninoseki/mitaka / buildURL

Function buildURL

src/utils.ts:6–14  ·  view source on GitHub ↗
(baseURL: string, path: string, params = {})

Source from the content-addressed store, hash-verified

4import type { Scanner, Searcher } from '~/types'
5
6export 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
16export function base64fy(s: string): string {
17 return Base64.encode(s).trim()

Callers 15

scanByURLMethod · 0.90
permaLinkMethod · 0.90
scanMethod · 0.90
searchByIPMethod · 0.90
searchByDomainMethod · 0.90
searchByHashMethod · 0.90
searchByIPMethod · 0.90
searchByDomainMethod · 0.90
searchByEmailMethod · 0.90
searchByCVEMethod · 0.90
searchByIPMethod · 0.90
searchByASNMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected