validation library
Barrel export for shared validation utilities.
Hosts and SDKs can import this file to access normalization helpers and duplicate resolution utilities without depending on internal paths.
Classes
- UyavaColorNormalizationResult
-
UyavaDeduplicatedEntry<
T> -
UyavaDeduplicationResult<
T> - UyavaDuplicateRecord
- Helpers for resolving duplicate payloads by identifier.
- UyavaShapeNormalizationResult
- UyavaTagNormalizationResult
- Shared normalization helpers used across the Uyava SDK, protocol, and core.
Functions
-
dedupeById<
T> (Iterable< T> entries, UyavaIdSelector<T> idSelector) → UyavaDeduplicationResult<T> -
Applies last-writer-wins deduplication to
entries, retaining metadata about conflicts for diagnostics while keeping the most recent payload for each id. -
normalizeColor(
Object? raw) → UyavaColorNormalizationResult -
Accepts raw color payloads, enforcing
#RRGGBBor#AARRGGBB. -
normalizeShape(
Object? raw) → UyavaShapeNormalizationResult -
Accepts lowercase identifiers matching
^[a-z0-9_-]+$. -
normalizeTags(
Object? raw) → UyavaTagNormalizationResult - Normalizes tag payloads by trimming, removing empties/non-strings, and de-duplicating case-insensitively while preserving first-seen ordering.
Typedefs
-
UyavaIdSelector<
T> = String? Function(T entry)