mirror of
https://github.com/penpot/penpot.git
synced 2025-02-02 04:19:08 -05:00
✨ Improve word-string schema generator
make it to generate a more readable strings
This commit is contained in:
parent
db52d98595
commit
0db1eed87f
1 changed files with 5 additions and 8 deletions
|
@ -77,14 +77,11 @@
|
||||||
|
|
||||||
(defn word-string
|
(defn word-string
|
||||||
[]
|
[]
|
||||||
(as-> tg/string-alphanumeric $$
|
(as-> tg/string-ascii $$
|
||||||
(tg/such-that (fn [v] (re-matches #"\w+" v)) $$ 50)
|
(tg/resize 10 $$)
|
||||||
(tg/such-that (fn [v]
|
(tg/fmap (fn [v] (apply str (re-seq #"[A-Za-z]+" v))) $$)
|
||||||
(and (not (str/blank? v))
|
(tg/such-that (fn [v] (>= (count v) 4)) $$ 100)
|
||||||
(not (re-matches #"^\d+.*" v))))
|
(tg/fmap str/lower $$)))
|
||||||
$$
|
|
||||||
50)))
|
|
||||||
|
|
||||||
|
|
||||||
(defn email
|
(defn email
|
||||||
[]
|
[]
|
||||||
|
|
Loading…
Add table
Reference in a new issue