Closed jinalskothari closed 7 years ago
I suppose you could short circuit object comparison at [line 182] by explicit equals of the operands (lhs and rhs). It might also prove to be a slight optimization for people not using immutables.
Hi @flitbit ,
I'd also need this, if I got it correctly it should be enough adding && lhs !== rhs
in line https://github.com/flitbit/diff/blob/master/index.js#L217
I can open a PR if my assumption is correct
In my application, I never mutate objects. Which means such comparision could be done by references alone.
Is there a way to exploit that in this library? Would it be difficult to add this feature with an optional paramter?
I'd be happy to make a PR if I were pointed in the right direction.