mirror of
https://github.com/penpot/penpot.git
synced 2025-04-29 19:46:19 +02:00
✨ Make schema uuid parsing fns private
This commit is contained in:
parent
a209966427
commit
e69c0c3e27
1 changed files with 8 additions and 9 deletions
|
@ -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)))
|
||||
|
|
Loading…
Add table
Reference in a new issue