You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When you want to transform both keys and values I think it makes sense to use clojure.walk/postwalk directly, like this: (postwalk #(if (keyword? %) (->snake_case_string %) %) {:fooish-bar :fooish-bar}).
I added transform-keys because it's such a common operation and a bit clumsy to do with postwalk directly. I'm not convinced transform-values would see much use, so I'm going to let this issue linger until somebody more chimes in that they miss it.
Should there be a counterpart to
transform-keys
calledtransform-values
? This would applyt
to non-map leaves.I have a current project where a kebabed value can appear both in key position and value position, so I need to transform it consistently.
I'm happy to submit a pull-request if this is something CSK is interested in.
The text was updated successfully, but these errors were encountered: