first kinda BREAKING change in the public api. m/parse
on :multi
now returns the branch information. Itβs a fix, but still:
(def Multi
[:multi {:dispatch :type}
[:user [:map [:size :int]]]
[::m/default :any]])
(m/parse Multi {:type :user, :size 1})
; => [:user {:type :user, :size 1}]
(m/parse Multi {:type "sized", :size 1})
; => [:malli.core/default {:type "sized", :size 1}]
(->> {:type :user, :size 1}
(m/parse Multi)
(m/unparse Multi))
; => {:type :user, :size 1}
+5 loc later (including comments): :and
merges on first child! comments welcome on the results - https://github.com/metosin/malli/pull/405
ping @raymcdermott
I thought it read 5k loc ... so π
I have added a quick comment. Thanks for the feature
Awesome MR! Thanks π
merged in master