Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add :default/fn prop for default-value-transformer
use case: we want the default value to be current time. previously you would have to do something like this: ``` (m/decode [:time/instant {:default :now}] nil (mt/default-value-transformer {:default-fn (fn [_ x ] (case x :now (java.time.Instant/now) x))})) ``` this patch lets you declare this without the indirection: ``` (m/decode [:time/instant {:default/fn #(java.time.Instant/now)}] nil mt/default-value-transformer) ```
- Loading branch information