Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

malli.util: add a rename-keys utility, similar to clojure.set #338

Merged
merged 1 commit into from
Jan 17, 2021

Conversation

tekacs
Copy link
Contributor

@tekacs tekacs commented Jan 16, 2021

It looked to me that renaming keys isn't a completely trivial operation for a user to implement themselves (without a series of dissoc/assoc pairs that would be pretty inefficient), so I added in a utility for performing it using transform-entries.

This... may not be the best implementation possible, so if there's a better way that's preferred I can do that or it can just be swapped out.

Also I may be missing an existing simple solution to this. :)

@ikitommi
Copy link
Member

Looks good, thanks!

@ikitommi ikitommi merged commit 3fff19b into metosin:master Jan 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants