support for NaN values
brainthinks opened this issue · comments
Brian Andress commented
Currently, NaN
values always result in CHANGE
, even though nothing changed. Technically in JS, NaN !== NaN
, so I understand that there is an argument for this behavior. However, I think that having a CHANGE
entry on EVERY diff when an object contains NaN
is noise, and therefore unexpected / undesirable behavior.
I propose treating NaN
values as equivalent, resulting in the following:
diff({ testNaN: NaN }, { testNaN: NaN }) === [] // true