selfrefactor / rambdax

Extended version of Rambda
https://selfrefactor.github.io/rambdax
MIT License
221 stars 26 forks source link

uniqBy is different from ramda #88

Closed agriffis closed 1 year ago

agriffis commented 1 year ago

I just stumbled on this...

In ramda, R.uniqBy uses R.equals for comparisons. In rambdax, R.uniqBy uses a native Set to collapse.

This means that R.uniqBy in rambdax doesn't work the same for array or object values.

Now that I know, I can rework my code, but I just wanted to raise the issue in case you'd like to handle this somehow, whether by documentation or types or changing behavior.

selfrefactor commented 1 year ago

Thank you for raising this up. I will check and get back to you as this doesn't look like a good surprise.

selfrefactor commented 1 year ago

I made a fix and it will be applied with next release.

agriffis commented 1 year ago

@selfrefactor When were you thinking of making a release?

selfrefactor commented 1 year ago

It is fixed in Rambda:

-R.uniqis not usingR.equalsas Ramda does - [Issue #88](https://github.com/selfrefactor/rambdax/issues/88)

but I yet to make release for Rambdax. I will let you know once it is done. Thanks for the reminder.

selfrefactor commented 1 year ago

I just published 9.1.0 with this change included