@xtandard/lib/tanstack/rison
Rison value codec for parseAsCodec (peers @effective/rison, valibot).
import { … } from "@xtandard/lib/tanstack/rison";Functions
Section titled “Functions”| Name | Summary |
|---|---|
risonCodec |
A ValueCodec that stores a validated value as readable, canonical Rison (stable key order → the same value always yields the same URL). encode produces the Rison token; decode parses it and validates against the valibot schema. Pair with parseAsCodec — it turns any throw (malformed token or failed validation) into null, so a stale/tampered URL resolves to the parser’s default instead of crashing. |