MCPcopy Index your code
hub / github.com/code100x/cms / getUpdatedUrl

Function getUpdatedUrl

src/lib/utils.ts:204–214  ·  view source on GitHub ↗
(
  path: string,
  prevQueryParams: QueryParams,
  newQueryParams: QueryParams,
)

Source from the content-addressed store, hash-verified

202};
203
204export const getUpdatedUrl = (
205 path: string,
206 prevQueryParams: QueryParams,
207 newQueryParams: QueryParams,
208) => {
209 const updatedQuery = { ...prevQueryParams, ...newQueryParams };
210 const queryString = new URLSearchParams(
211 updatedQuery as Record<string, string>,
212 ).toString();
213 return `${path}?${queryString}`;
214};
215
216export const searchParamsToObject = (
217 searchParams: URLSearchParams,

Callers 7

handleSearchFunction · 0.90
handleOnCloseClickFunction · 0.90
PaginationFunction · 0.90
processLineFunction · 0.90
CommentsFunction · 0.90
QuestionsPageFunction · 0.90
SingleAnswerPageFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected