I have been using Immutable.js for some time, and just now I found out that the comparison operator does not work how I thought.
My code is simple:
a = Immutable.Map({a:1, b:[1,2,3]})
b = Immutable.Map({a:1, b:[1,2,3]})
a == b // false
Immutable.is(a, b) // false
Is there any way to compare two of the same Immutable objects and get true
?
Functional logic tells me they should be equal, but in JavaScript they are not.