New ES 6 (Harmony) introduces new Set object. Identity algorithm used by Set is similar to ===
operator and so not much suitable for comparing objects:
To add to the answers here, I went ahead and implemented a Map wrapper that takes a custom hash function, a custom equality function, and stores distinct values that have equivalent (custom) hashes in buckets.
Predictably, it turned out to be slower than czerny's string concatenation method.
Full source here: https://github.com/makoConstruct/ValueMap