d3-array currently uses function accessors, e.g.
d3.median(data, d => d.foo)
What if a string could be used instead of an accessor for convenience?
There’s some precedent for this, e.g. Lodash’s _.property:
(However, I don’t think we want to support nested properties as in Lodash. I think these should be simple property names with no implicit DSL.)
Here’s where it might be used:
d3-array currently uses function accessors, e.g.
What if a string could be used instead of an accessor for convenience?
There’s some precedent for this, e.g. Lodash’s _.property:
(However, I don’t think we want to support nested properties as in Lodash. I think these should be simple property names with no implicit DSL.)
Here’s where it might be used: