d3/d3-array

d3.uniques?

mbostock opened this issue · 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.