jrTilak / lazykit

Refine your JavaScript workflows with Lazykit. A concentrated collection of lean utility functions, not a bloated library.
https://lazykit.thapatilak.com.np
MIT License
6 stars 2 forks source link

invertObj: invert the keys and values of an object #56

Open jrTilak opened 2 months ago

ebe25 commented 2 months ago

hey @jrTilak can i get this assigned? What I have in mind that this has to be done under objects right in registry? image

or what else do you have in your mind?

jrTilak commented 2 months ago

Yes you are right. It's under objects and the keys will be values and values will be keys.

Just consider the edge cases like when the values are array or objects.