MCPcopy
hub / github.com/redpanda-data/console / queryToObj

Function queryToObj

frontend/src/utils/query-helper.ts:27–35  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

25 * const search = useSearch({ from: '/your-route' });
26 */
27export const queryToObj = (str: string) => {
28 const query = new URLSearchParams(str);
29 const obj = {} as Record<string, string>;
30 for (const [k, v] of query.entries()) {
31 obj[k] = v;
32 }
33
34 return obj;
35};
36
37/**
38 * Converts an object to a URL query string.

Callers 1

editQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…