Expose some/more/all functions from utilHelpers #2663
alexandernst
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi @kumilingus !
I started migrating to the v4 and I noticed something that might be interesting to explore. I'm currently using lodash in my project just because JJ was also using it ("I don't mind ading this dependency to the project since the extra bytes are already required by JJ"). Since JJ dropped the lodash dependency, now I'm suddenly using a library that I might as well drop.
I noticed that JJ actually copied some of lodash's functions, which I'm able to use by importing
util
from@joint/core
, which is very nice. But there are a few functions that I'm missing.For example, I'm missing
isEqualWith
. That function is basically justisEqual
with a custom comparator. And JJ does have abaseIsEqualDeep
which accepts a custom comparator, but that function is not exposed.Currently I'm forced to either copy myself the required functions from lodash or use an external package that mimics these functions (for example,
lodash.isEqualWith
). But both solutions seem unnecessary since JJ already has all that code, it's just that it's not exported.And I assume that there must be more people in my situation. So, my proposal would be to expose some more (all?) of the functions in
utilHelpers
. Bonus points for this not being a breaking change, which means that it can be done safely even in a patch version. What do you think? 🙏Beta Was this translation helpful? Give feedback.
All reactions