mbostock opened this issue 6 years ago · 1 comments
function uniques(values) { return Array.from(new Set(values)); }
But with an optional accessor?
I think in many cases you don’t need an array, and a Set would suffice and be a more natural representation. Hence you could just use the Set constructor, or Set.from if that lands.