UNPKG

@dnb/eufemia

Version:

DNB Eufemia Design System UI Library

11 lines (10 loc) 416 B
import type { FilterValue } from '../FilterContext'; /** * Validates and sanitizes filter data parsed from a URL query parameter. * * Protects against: * - Non-object payloads (arrays, primitives, null) * - Prototype pollution keys (__proto__, constructor, prototype) * - Entries that don't match the FilterValue shape */ export declare function sanitizeUrlFilters(raw: unknown): Record<string, FilterValue>;