/** * Validation utilities for common data types * * Why: Provides reusable validation functions for email, URI, and other formats * Centralizes validation logic and ensures consistency across the application */ /** * Validates that a property name is safe to use as dynamic object key. * Prevents prototype pollution attacks. */ export declare function isSafePropertyName(name: string): boolean; /** * Check whether object has an own property key (prototype-safe). */ export declare function hasOwnKey(obj: Record, key: string): boolean; /** * Escape special regex characters in a string. * Prevents ReDoS attacks when using dynamic strings in RegExp. */ export declare function escapeRegExp(str: string): string; /** * Redact specific header from headers object (case-insensitive) */ export declare function redactHeader(headers: unknown, headerName: string): Record; /** * Redact query parameter from URL string */ export declare function redactQueryParam(url: string | undefined, paramName: string): string; /** * Redact parameter from params object */ export declare function redactParam(params: unknown, paramName: string): Record; /** * Validates if a string is a valid email address */ export declare function isEmail(value: string): boolean; /** * Validates if a string is a valid URI */ export declare function isUri(value: string): boolean; /** * Escape HTML special characters to prevent XSS attacks * * Why: User-provided strings in error messages must be sanitized * before being returned in JSON responses that might be rendered as HTML. * * Uses escape-html library for reliable HTML entity escaping. * * @param str - String to escape (can be undefined or null) * @returns Escaped string safe for HTML rendering, empty string if input is falsy */ export declare function escapeHtmlSafe(str: string | undefined | null): string; //# sourceMappingURL=validation-utils.d.ts.map