ts-belt icon indicating copy to clipboard operation
ts-belt copied to clipboard

Docs should clarify on depth of object-related functions

Open TClark1011 opened this issue 2 years ago • 5 comments

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 avatar Mar 31 '22 23:03 TClark1011

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

TClark1011 avatar Apr 14 '22 02:04 TClark1011

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

jrolfs avatar May 25 '22 22:05 jrolfs

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

mobily avatar Jun 05 '22 12:06 mobily

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 ;)

jrolfs avatar Jun 10 '22 19:06 jrolfs

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

tibotiber avatar May 04 '23 10:05 tibotiber