MCPcopy Create free account
hub / github.com/dailydotdev/apps / getPathnameWithQuery

Function getPathnameWithQuery

packages/shared/src/lib/links.ts:102–115  ·  view source on GitHub ↗
(
  pathname: string,
  params: URLSearchParams | string,
)

Source from the content-addressed store, hash-verified

100};
101
102export const getPathnameWithQuery = (
103 pathname: string,
104 params: URLSearchParams | string,
105): string => {
106 const [basePath, existingQuery] = pathname.split('?');
107 const merged = new URLSearchParams(existingQuery?.trim());
108 const overrides = new URLSearchParams(params);
109 overrides.forEach((value, key) => {
110 merged.set(key, value);
111 });
112 const queryString = merged.toString();
113
114 return `${basePath}${queryString ? `?${queryString}` : ''}`;
115};
116
117export const agentsHighlightsPath = '/highlights/vibes';
118

Callers 15

PersonalizedDigestFunction · 0.90
OpportunityEditPanelFunction · 0.90
NavDrawerFunction · 0.90
HeaderFunction · 0.90
FeaturedCoresWidgetFunction · 0.90
BuyCoreFunction · 0.90
FooterFunction · 0.90
BriefPostContentRawFunction · 0.90
links.spec.tsFile · 0.90
redirectToAppFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected