MCPcopy Create free account
hub / github.com/sourcebot-dev/sourcebot / getSearchParam

Function getSearchParam

packages/web/src/hooks/useNonEmptyQueryParam.ts:30–33  ·  view source on GitHub ↗
(param: string, searchParams: URLSearchParams | null)

Source from the content-addressed store, hash-verified

28 * @see useNonEmptyQueryParam
29 */
30export const getSearchParam = (param: string, searchParams: URLSearchParams | null) => {
31 const paramValue = searchParams?.get(param) ?? undefined;
32 return (paramValue !== undefined && paramValue.length > 0) ? paramValue : undefined;
33}

Callers 1

useNonEmptyQueryParamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected