documentcloud/underscore — Issue #461: difference() behaviour change between 1.1.7 and 1.3.1
Author: duncan-bayne
Created: 2012-02-06 05:50:53+00:00
State: open

In 1.1.7, difference() seems to identify differences between objects:

_.difference({a: "b", c: "d", e: "f"}, {a: "b"})
["d", "f"]

In 1.3.1, difference fails to identify differences. Perhaps it's comparing reference equality rather than value equality now?

_.difference({a: "b", c: "d", e: "f"}, {a: "b"})
["b", "d", "f"]