mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 22:49:01 -05:00
💄 Add minor cosmetic changes to common.spec ns
This commit is contained in:
parent
d666564112
commit
6240323704
1 changed files with 5 additions and 5 deletions
|
@ -201,18 +201,18 @@
|
|||
|
||||
(letfn [(conformer-fn [dest v]
|
||||
(cond
|
||||
(coll? v) (into dest non-empty-strings-xf v)
|
||||
(coll? v) (into dest non-empty-strings-xf v)
|
||||
(string? v) (into dest non-empty-strings-xf (str/split v #"[\s,]+"))
|
||||
:else ::s/invalid))
|
||||
(unformer-fn [v]
|
||||
(str/join "," v))]
|
||||
(s/def ::set-of-strings
|
||||
(s/with-gen (s/conformer (partial conformer-fn #{}) unformer-fn)
|
||||
#(tgen/set (s/gen ::not-empty-string))))
|
||||
(-> (s/conformer (partial conformer-fn #{}) unformer-fn)
|
||||
(s/with-gen #(tgen/set (s/gen ::not-empty-string)))))
|
||||
|
||||
(s/def ::vector-of-strings
|
||||
(s/with-gen (s/conformer (partial conformer-fn []) unformer-fn)
|
||||
#(tgen/vector (s/gen ::not-empty-string)))))
|
||||
(-> (s/conformer (partial conformer-fn []) unformer-fn)
|
||||
(s/with-gen #(tgen/vector (s/gen ::not-empty-string))))))
|
||||
|
||||
;; --- SPEC: set-of-valid-emails
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue