How about d3.indexBy(array, key)
gka opened this issue · 2 comments
gka commented
Identical behaviour as in _.indexBy.
var indexed = d3.nest()
.key(d => d.FIPS)
.rollup(values => values[0])
.object(data);
would become
var indexed = d3.indexBy(data, d => d.FIPS);
1wheel commented
I'm ambivalent.
I usually include underscore so wouldn't use this too much. And where do we draw the line on which underscore functions not to include?
On the other hand, I basically only use _.indexBy
, _.min
, _.sortBy
and _.debounce
which isn't a lot...
gka commented
agreed. let's keep using underscore