clj-commons / camel-snake-kebab

A Clojure[Script] library for word case conversions
https://clj-commons.org/camel-snake-kebab/
Eclipse Public License 1.0
475 stars 48 forks source link

Add `transform-top-keys` #53

Closed BWStearns closed 3 years ago

BWStearns commented 5 years ago

Make a function that will transform only the top level keys as opposed to recursively doing so.

BWStearns commented 5 years ago

Motivation for this function was that using the transform-keys function at the boundaries of my API (DB and out to frontend) was causing issues where nested maps made of user data were getting cased as well. I know it's not a complex function to simply add into my utils.cljc file but it would be nice to have alongside the recursive version as well.

qerub commented 5 years ago

I'll let this PR stay unmerged until somebody more thinks this function belongs in the library.

qerub commented 3 years ago

Sorry, I am closing this PR due to lack of interest from other parties. It will hopefully still be discoverable by others who might need this code.