This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-02-18
Channels
- # announcements (1)
- # asami (17)
- # babashka (43)
- # beginners (36)
- # biff (2)
- # calva (24)
- # clerk (3)
- # clj-kondo (9)
- # cljdoc (18)
- # clojure (16)
- # clojure-berlin (1)
- # clojure-europe (7)
- # clojurescript (8)
- # clr (4)
- # conjure (3)
- # cursive (2)
- # emacs (15)
- # funcool (4)
- # humbleui (2)
- # hyperfiddle (116)
- # kaocha (3)
- # malli (5)
- # membrane (23)
- # off-topic (16)
- # pathom (3)
- # reitit (25)
- # releases (3)
- # shadow-cljs (13)
- # xtdb (6)
I want to define a schema for a map that can contain anything (it's a placeholder)
(every? true? [(m/validate schema {:foo "bar" "foo" :bar})
(m/validate schema {{:a :b :c :d} [:ho :ho :ho]})
(m/validate schema {})
(not (m/validate schema '()))
(not (m/validate schema #{}))
(not (m/validate schema []))])
;;=> true
[:map-of any? any?]
seems to work; is it the right schema to use?✅ 2
Because I was sure I tried it and it didn't work
Thanks, I suspected I was missing something obvious 🙂