MCPcopy Create free account
hub / github.com/L-excellence/monitor-sdk / parseQueryString

Function parseQueryString

utils/index.ts:22–30  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

20 * 解析 url 中的 query string
21 */
22export function parseQueryString(url: string) {
23 const queryString = url.split("?")[1];
24 const queryParams: Record<string, string> = {};
25 queryString?.split("&").forEach(item => {
26 const [key, value] = item.split("=");
27 queryParams[key] = value;
28 })
29 return queryParams;
30}

Callers 1

handlerFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected