A Set
handles 2 empty objects as different, e.g.:
let s = new Set([ {} ]);
s.has({}); // false
This is expected, but it would be useful to compare based on their contents instead, as is possible in various other languages.
Is there any way to override the Set
's internal comparison operator?