mobily / ts-belt

🔧 Fast, modern, and practical utility library for FP in TypeScript.
https://mobily.github.io/ts-belt
MIT License
1.09k stars 30 forks source link

Docs should clarify on depth of object-related functions #28

Open TClark1011 opened 2 years ago

TClark1011 commented 2 years ago

I think it would be helpful if the API documentation would give clarification on whether or not functions such as F.equals or D.merge are shallow or deep. We can work this out by looking at the source code, but this shouldn't be necessary and is espescially annoying for people who don't know rescript.

TClark1011 commented 2 years ago

Another one to include could be the comparison performed in A.includes

jrolfs commented 2 years ago

It seems from looking at the source as a ReScript noob that D.merge is, in fact, shallow?

mobily commented 2 years ago

@jrolfs D.merge uses Object.assign under the hood :)

jrolfs commented 2 years ago

Hehe, yep that was my conclusion — would you be open to adding a deepMerge implementation? I've been considering switching some projects over from Ramda and it would make the switch more compelling ;)

tibotiber commented 1 year ago

I'd love to see deepMerge happen. Is anyone aware of any work on it?