Renames for better compatibility.
mbostock opened this issue · comments
Mike Bostock commented
In D3 3.x, the request-and-parse methods were renamed:
- d3.csv ↦ d3.requestCsv
- d3.html ↦ d3.requestHtml
- d3.json ↦ d3.requestJson
- d3.text ↦ d3.requestText
- d3.tsv ↦ d3.requestTsv
- d3.xml ↦ d3.requestXml
This was needed in part because this repo, d3-dsv, defines two objects:
- d3.csv
- d3.tsv
These objects then expose methods:
- d3.csv.parse
- d3.csv.parseRows
- d3.csv.format
- d3.csv.formatRows
- d3.tsv.parse
- d3.tsv.parseRows
- d3.tsv.format
- d3.tsv.formatRows
The downside of this renaming is that the commonly used methods were renamed (and longer), while the less commonly used methods stayed the same.
However, another option would be to retain the short names for requests:
- d3.csv
- d3.html
- d3.json
- d3.text
- d3.tsv
- d3.xml
And rather than exposing d3.csv and d3.tsv objects, expose the methods directly:
- d3.csvParse
- d3.csvParseRows
- d3.csvFormat
- d3.csvFormatRows
- d3.tsvParse
- d3.tsvParseRows
- d3.tsvFormat
- d3.tsvFormatRows