MCPcopy Create free account
hub / github.com/APIParkLab/APIPark / getQueryFromURL

Function getQueryFromURL

frontend/packages/common/src/utils/postcat.tsx:153–160  ·  view source on GitHub ↗
(url: string)

Source from the content-addressed store, hash-verified

151// eslint-disable-next-line @typescript-eslint/no-explicit-any
152type SafeAny = any
153export const getQueryFromURL = (url: string): { [key: string]: string } => {
154 const result: SafeAny = {}
155 //? prevent double question mark
156 new URLSearchParams(url.split('?').slice(1).join('?')).forEach((val, name) => {
157 result[name] = val
158 })
159 return result
160}
161
162/**
163 * Sync URL and Query

Callers 1

syncUrlAndQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected