Replies: 1 comment
-
Ooops, I just found https://radash-docs.vercel.app/docs/object/map-entries |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Yesterday, during a review, a coworker asked me to replace this:
by
or
To avoid eslint complains due to https://eslint.org/docs/latest/rules/guard-for-in
Which, is factually safer but, IMHO, reduces too much the readability.
As a tradeoff I wrote this little function which may be interesting to find in Radash
Also investigating performances difference between
fromEntries() + entries() + map()
VSmap() + entries() + reduce()
VSfor ... in + hasOwn()
Beta Was this translation helpful? Give feedback.
All reactions