MCPcopy Create free account
hub / github.com/UI5/webcomponents / applyURLParam

Function applyURLParam

packages/base/src/InitialConfiguration.ts:185–202  ·  view source on GitHub ↗
(key: string, value: string, paramType: string)

Source from the content-addressed store, hash-verified

183};
184
185const applyURLParam = (key: string, value: string, paramType: string) => {
186 const lowerCaseValue = value.toLowerCase();
187 const param = key.split(`${paramType}-`)[1];
188
189 if (booleanMapping.has(value)) {
190 value = booleanMapping.get(lowerCaseValue);
191 }
192
193 if (param === "theme") {
194 initialConfig.theme = normalizeThemeParamValue(param, value);
195
196 if (value && value.includes("@")) {
197 initialConfig.themeRoot = normalizeThemeRootParamValue(value);
198 }
199 } else {
200 initialConfig[param] = value;
201 }
202};
203
204const applyOpenUI5Configuration = () => {
205 const openUI5Support = getFeature<typeof OpenUI5Support>("OpenUI5Support");

Callers 1

parseURLParametersFunction · 0.85

Calls 3

normalizeThemeParamValueFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…