mirror of
https://github.com/penpot/penpot.git
synced 2025-01-22 14:39:45 -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
|
||||
[]
|
||||
(as-> tg/string-alphanumeric $$
|
||||
(tg/such-that (fn [v] (re-matches #"\w+" v)) $$ 50)
|
||||
(tg/such-that (fn [v]
|
||||
(and (not (str/blank? v))
|
||||
(not (re-matches #"^\d+.*" v))))
|
||||
$$
|
||||
50)))
|
||||
|
||||
(as-> tg/string-ascii $$
|
||||
(tg/resize 10 $$)
|
||||
(tg/fmap (fn [v] (apply str (re-seq #"[A-Za-z]+" v))) $$)
|
||||
(tg/such-that (fn [v] (>= (count v) 4)) $$ 100)
|
||||
(tg/fmap str/lower $$)))
|
||||
|
||||
(defn email
|
||||
[]
|
||||
|
|
Loading…
Add table
Reference in a new issue