ion-js
ion-js copied to clipboard
.equals() should be lenient by default
Currently, the (not yet released) .equals()
method for dom.Value
subclasses is strict by default. It checks for Ion equivalence between the two values being compared. JS values cannot be compared and annotations must be equal. This functionality is necessary for our test suite, but is of limited utility to end users.
I think we should make .equals()
a loose definition of equality, comparing across Ion and JS values and ignoring annotations. Then we can provide a separate method (ionEquals()
?) that performs the strict test.