Make schema uuid parsing fns private

This commit is contained in:
Andrey Antukh 2025-04-16 09:51:55 +02:00
parent a209966427
commit e69c0c3e27

View file

@ -390,17 +390,16 @@
(register! :merge (mu/-merge))
(register! :union (mu/-union))
(def uuid-rx
#"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
(defn parse-uuid
(defn- parse-uuid
[s]
(try
(uuid/parse s)
(catch #?(:clj Exception :cljs :default) _cause
s)))
(if (str/empty? s)
nil
(try
(uuid/parse s)
(catch #?(:clj Exception :cljs :default) _cause
s))))
(defn encode-uuid
(defn- encode-uuid
[v]
(when (uuid? v)
(str v)))