mirror of
https://github.com/penpot/penpot.git
synced 2025-05-01 03:16:34 +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! :merge (mu/-merge))
|
||||||
(register! :union (mu/-union))
|
(register! :union (mu/-union))
|
||||||
|
|
||||||
(def uuid-rx
|
(defn- parse-uuid
|
||||||
#"^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$")
|
|
||||||
|
|
||||||
(defn parse-uuid
|
|
||||||
[s]
|
[s]
|
||||||
(try
|
(if (str/empty? s)
|
||||||
(uuid/parse s)
|
nil
|
||||||
(catch #?(:clj Exception :cljs :default) _cause
|
(try
|
||||||
s)))
|
(uuid/parse s)
|
||||||
|
(catch #?(:clj Exception :cljs :default) _cause
|
||||||
|
s))))
|
||||||
|
|
||||||
(defn encode-uuid
|
(defn- encode-uuid
|
||||||
[v]
|
[v]
|
||||||
(when (uuid? v)
|
(when (uuid? v)
|
||||||
(str v)))
|
(str v)))
|
||||||
|
|
Loading…
Add table
Reference in a new issue