MCPcopy Create free account
hub / github.com/adrianhajdin/event_platform / removeKeysFromQuery

Function removeKeysFromQuery

lib/utils.ts:74–88  ·  view source on GitHub ↗
({ params, keysToRemove }: RemoveUrlQueryParams)

Source from the content-addressed store, hash-verified

72}
73
74export function removeKeysFromQuery({ params, keysToRemove }: RemoveUrlQueryParams) {
75 const currentUrl = qs.parse(params)
76
77 keysToRemove.forEach(key => {
78 delete currentUrl[key]
79 })
80
81 return qs.stringifyUrl(
82 {
83 url: window.location.pathname,
84 query: currentUrl,
85 },
86 { skipNull: true }
87 )
88}
89
90export const handleError = (error: unknown) => {
91 console.error(error)

Callers 2

onSelectCategoryFunction · 0.90
SearchFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected