Very late to the party, but this library does exactly what you're looking for: https://github.com/adamhamlin/deep-equality-data-structures
const map = new DeepMap([[{a: 1}, 2]]);
console.log(map.get({a: 1})); // Prints: 2
Full disclosure: I am the library author