d3 / d3-dsv

A parser and formatter for delimiter-separated values, such as CSV and TSV.
https://d3js.org/d3-dsv
ISC License
437 stars 76 forks source link

dsv2json: Add '-a/--auto-type' flag to use d3.autoType #64

Closed joallard closed 4 years ago

joallard commented 4 years ago

It was a need I had converting some files, seemed straightforward enough.

I'm thinking we don't want to make this the default for now.

Fil commented 4 years ago

I'm thinking we don't want to make this the default for now.

Agree: the default should be the same in the cli utility and in d3.

Fil commented 4 years ago

Sorry for l'esprit d'escalier but shouldn't we use camel case (autoType), like the original method?

mbostock commented 4 years ago

Probably —auto-type…

joallard commented 4 years ago

I've pondered this myself, and my thought process was that I'd be pretty disappointed to type --autotype only for it to get ignored because I didn't write --auto-type. That said, that is pretty minor, considering people will either use -a or consult the help. It does make complete sense to keep it consistent with the method name. I don't have strong opinions on this.

Let me know if you'd like me to fixup the commit with --auto-type

Fil commented 4 years ago

merged with syntax --auto-type; thank you!

joallard commented 4 years ago

Sounds good, merci @Fil!