Closed rdmurphy closed 4 years ago
I’m cool with exporting formatRow and formatValue. :+1:
Concrete tasks appear to include:
formatRow
https://github.com/d3/d3-dsv/blob/49726009255484987c7f2028f1cc9d80ab43f5cb/src/dsv.js#L144formatRow
to the READMEformatValue
https://github.com/d3/d3-dsv/blob/49726009255484987c7f2028f1cc9d80ab43f5cb/src/dsv.js#L148formatValue
to the README@curran I see now I named the pull request the wrong thing months ago but I've already done those four things here: https://github.com/d3/d3-dsv/pull/58
Oh excellent! Somehow I didn't see that PR. Nice work!
Fixed in 437da9a9ab034e4a42d4b0f5e29d833a96069a4d.
Hello!
I've found myself more and more using
d3-dsv
as a sort of a Swiss Army knife of CSV manipulation — if I want to ensure that an Array of data gets properly delimited, I'll reach forformatRows
and trust it'll do the right thing. But when I'm working with Node.js streams and looping through data line-by-line (meaning I don't have access to the entire "body" of data at any given time), it'd be neat if I could tap directly intoformatRow
.It's not end of the world to have to use
formatRows
instead, but it requires me to create a dummy Array to wrap the individual row of data with every pass, which feels a little dirty.In the case of
formatBody
, it kind of defeats the point to "singularize" that, but ifformatValue
was made available I could reproduce the effect by creating my own single row function built on it for zipping purposes.Thank you! Looking forward to your thoughts.