File size: 231 Bytes
1e92f2d | 1 2 3 4 5 6 | // Convert router.asPath to a URLSearchParams object
// example: /dynamic/[slug]?foo=bar -> { foo: 'bar' }
export function asPathToSearchParams(asPath: string): URLSearchParams {
return new URL(asPath, 'http://n').searchParams
}
|