Publish ITWorx Pulse source
Public source validation / validate (push) Failing after 3m8s

This commit is contained in:
ITWorx Pulse release export committed 2026-09-03 02:09:19 +02:00
commit bd774932d5
614 files changed
+77116

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
export function queryValue(name: string, allowed?: readonly string[], fallback = ''): string {
if (typeof window === 'undefined') return fallback;
const value = new URLSearchParams(window.location.search).get(name) ?? fallback;
return !allowed || allowed.includes(value) ? value : fallback;
}
export function replaceListQuery(values: Record<string, string>): void {
if (typeof window === 'undefined') return;
const params = new URLSearchParams(window.location.search);
for (const [key, value] of Object.entries(values)) {
if (value) params.set(key, value); else params.delete(key);
}
const query = params.toString();
window.history.replaceState({}, '', window.location.pathname + (query ? `?${query}` : ''));
}