MCPcopy Create free account
hub / github.com/npmx-dev/npmx.dev / normalizeSearchParam

Function normalizeSearchParam

shared/utils/url.ts:41–47  ·  view source on GitHub ↗
(query?: LocationQueryValue | LocationQueryValue[])

Source from the content-addressed store, hash-verified

39}
40
41export function normalizeSearchParam(query?: LocationQueryValue | LocationQueryValue[]): string {
42 if (!query) return ''
43
44 if (typeof query === 'string') return query
45
46 return normalizeSearchParam(query[0])
47}

Callers 4

useGlobalSearchFunction · 0.90
useStructuredFiltersFunction · 0.85
useOrgPackagesFunction · 0.85
useUserPackagesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected