mirror of
https://github.com/penpot/penpot.git
synced 2025-04-13 15:31:26 -05:00
Add uuid-str?
predicate.
This commit is contained in:
parent
a95bd7f02a
commit
d6f96c246d
1 changed files with 10 additions and 0 deletions
|
@ -80,6 +80,16 @@
|
|||
(disj s v)
|
||||
(conj s v)))
|
||||
|
||||
;; --- String utils
|
||||
|
||||
(def +uuid-re+
|
||||
#"^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$")
|
||||
|
||||
(defn uuid-str?
|
||||
[v]
|
||||
(and (string? v)
|
||||
(re-seq +uuid-re+ v)))
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
;; Numbers Parsing
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
|
Loading…
Add table
Reference in a new issue