MCPcopy Create free account
hub / github.com/BuilderIO/mitosis / getQueryParam

Function getQueryParam

packages/fiddle/src/functions/get-query-param.ts:7–17  ·  view source on GitHub ↗
(name: string)

Source from the content-addressed store, hash-verified

5}
6
7export const getQueryParam = (name: string): string | null => {
8 if (!isBrowser()) {
9 return null;
10 }
11
12 const urlParams = new URLSearchParams(window.location.search);
13 const rawValue = urlParams.get(name);
14 const decompressedValue = rawValue && decompressFromBase64(rawValue);
15
16 return decompressedValue ?? rawValue;
17};

Callers 4

Talk.tsxFile · 0.90
FiddleFunction · 0.90
Fiddle.tsxFile · 0.90
FiddleFunction · 0.90

Calls 2

getMethod · 0.80
isBrowserFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…