ion-js icon indicating copy to clipboard operation
ion-js copied to clipboard

.equals() should be lenient by default

Open zslayton opened this issue 3 years ago • 0 comments

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.

zslayton avatar Feb 25 '21 19:02 zslayton