Closed joelmoss closed 3 years ago
It's based on immutable (and shared?) state model, so it doesn't pass and it's intentional.
It checks Object.is
at the leaf node of affectted, which is .a
in this case.
Also, if it finds equal node at the intermediate node, we stop traversing even if it's not the leaf of affected. This principal improves performance.
(One regret: I shouldn't have named "Deep" which misleads deep-equal.)
One regret: I shouldn't have named "Deep" which misleads deep-equal.
Ah well that is definately where I got confused. thx for the explanation.
I would definitely rename them when I had a chance. (maybe when we introduce breaking changes in v2. no such plan yet.) Elaborating more in README would be helpful, if we got more attention to this library. Closing this issue, but suggestions are always welcome.
Apologies if I'm missing something here, but shouldn't the following test pass?
s1
and the given objects are identical, soisDeepChanged
should befalse
, and from my understanding, this is not a referential comparison.Hopefully you can clear this up for me. thx