This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-01-06
Channels
- # announcements (16)
- # aws (9)
- # babashka (76)
- # beginners (92)
- # boot (1)
- # cider (18)
- # clara (7)
- # clj-kondo (26)
- # clojure (104)
- # clojure-europe (4)
- # clojure-nl (11)
- # clojure-spec (11)
- # clojure-survey (101)
- # clojure-uk (35)
- # clojuredesign-podcast (18)
- # clojurescript (8)
- # core-async (29)
- # data-science (1)
- # datomic (13)
- # emacs (4)
- # fulcro (20)
- # graalvm (14)
- # instaparse (2)
- # jobs (1)
- # juxt (6)
- # malli (5)
- # off-topic (30)
- # onyx (3)
- # planck (1)
- # project-updates (7)
- # re-frame (38)
- # reagent (30)
- # reitit (14)
- # remote-jobs (2)
- # shadow-cljs (50)
- # sql (8)
yeah, the default-value-transformer
uses schema properties and mounts for all schemas.
Breaking transformer api, hopefully making it better: https://github.com/metosin/malli/pull/162
The goal is to have a unified api for creating Transformers: all are created via a function, instead of mixing functions and actual Transformer
instances. So, instead of:
(mt/transformer
mt/string-transformer
mt/strip-extra-keys-transformer
(mt/key-transformer
{:decode #(-> % name (str "_key") keyword)
:encode #(-> % name (str "_key"))}))
we should do:
(mt/transformer
(mt/string-transformer)
(mt/strip-extra-keys-transformer)
(mt/key-transformer
{:decode #(-> % name (str "_key") keyword)
:encode #(-> % name (str "_key"))}))
… both work thou, thanks to auto-coercion of functions => Transformers.in other libs (schema, spec-tools) the json-transformer|matcher
are just values, so people most likely try that instead of call the function. Not 100% happy with having the auto-coercion, but here thought the developer experience is more important than having an one explicit (non-familiar?) syntax.