@xtandard/kit/util/core — the dependency-free part of @xtandard/kit/util: durations, id
generators, canonical JSON and the JSON / Actor types. It never loads valibot, so hot paths
that only mint ids or parse durations stay light. @xtandard/kit/util re-exports all of it plus
the validation core.
Strict canonical serialisation (keys sorted at every depth, no whitespace) for byte formats that must not silently change values — e.g. integrity hashes and idempotency comparison. Unlike canonicalJson it throws on non-finite numbers instead of writing null. Matches RFC 8785 (JCS) for strings and integers. A top-level undefined serialises as null.
Parse a comma-separated list of durations ("0,30s,5m,1h"), as used for retry schedules in env vars. Bare numbers become milliseconds; empty items are skipped. Every item is validated eagerly, so a bad list fails at parse time rather than when it is first used.
What canonicalStringify accepts: a JsonValue whose object members (and array items) may also be undefined. Undefined members are dropped and undefined items become null, exactly as JSON.stringify does.