NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2372 most downloaded on npm
A parser and formatter for delimiter-separated values, such as CSV and TSV
Last release 5 years ago
no release in 18 months
Ships fairly regularly
a new release about every 6 months
Most releases are documented
notes for 27 of 37 stable releases
Nothing withdrawn
no release was ever pulled
11 years old
38 releases · first in 2015
Update dependencies. Make build reproducible.
This package now requires Node.js 12 or higher. For more, please read Sindre Sorhus’s FAQ .
This package now requires Node.js 12 or higher. For more, please read Sindre Sorhus’s FAQ.
v3.0.0
Compare
One column per quarter.
Add -a --auto-type flag to dsv2json to use d3.autoType . Thanks, @joallard !
-a --auto-type flag to dsv2json to use d3.autoType. Thanks, @joallard!This release adopts ES2015 language features such as for-of and drops support for older browsers, including IE. If you need to support pre-ES2015 environments, you should stick with d3-dsv 1.x or use a transpiler.
Nothing published for this version
Add sideEffects: false to the package.json.
Fix undefined fields for missing trailing columns; these are now empty strings. #48
Favor a more concise ISO 8601 format for dates in dsv .format and dsv .formatRows .
Add d3.autoType for automatic type inference when parsing!
Housekeeping.
Update dependencies.
Fix missing *data*.columns when the string to parse is empty (#31). Thanks, @tomwanzek!
Fix broken d3 global in vanilla environments. Thanks, @curran!
d3 global in vanilla environments. Thanks, @curran! (#29)Fix parsing when the last field is empty (e.g., foo,bar,).
foo,bar,).Nothing published for this version
Fix escaping of strings containing carriage returns. Thanks, @jsedlacek!
Added dsv2dsv, dsv2json and json2dsv command-line tools.
The csv2json and related command-line tools now support newline-delimited JSON (#19).
Add module entry point to package.json.
module entry point to package.json.…before formatting, fixing an obscure crash, and deprecated support for falling back to _dsv_.formatRows when the input _data_ is an array of arrays ha…
Pursuant to the great namespace flattening, various CSV and TSV methods have new names:
The d3.csv and d3.tsv methods for loading files of the corresponding formats have not been renamed, however! Those are defined in d3-request.There’s no longer a d3.dsv method, which served the triple purpose of defining a DSV formatter, a DSV parser and a DSV requestor; instead, there’s just d3.dsvFormat which you can use to define a DSV formatter and parser. You can use request.response to make a request and then parse the response body, or just use d3.text.
The dsv.parse method now exposes the column names and their input order as data.columns. For example:
d3.csv("cars.csv", function(error, data) {
if (error) throw error;
console.log(data.columns); // ["Year", "Make", "Model", "Length"]
});
You can likewise pass an optional array of column names to dsv.format to format only a subset of columns, or to specify the column order explicitly:
var string = d3.csvFormat(data, ["Year", "Model", "Length"]);
The parser is a bit faster and the formatter is a bit more robust: inputs are coerced to strings before formatting, fixing an obscure crash, and deprecated support for falling back to dsv.formatRows when the input data is an array of arrays has been removed.
See CHANGES for all D3 changes since 3.x.
Export to the global d3 in vanilla environments (d3/d3#2840).
d3 in vanilla environments (d3/d3#2840).Fix string coercion during formatting.
- Relax rw dependency.
Rename d3.dsv to d3.dsvFormat (#15).
Renamed d3.csv.parse to d3.csvParse.
Nothing published for this version
Nothing published for this version
_dsv_.parse now passes the column names to the row function.
_dsv_.format now takes an optional array of column names.
Expose the columns array in the result of _dsv_.parse.
columns array in the result of dsv.parse.Nothing published for this version
Define d3-dsv module (and d3_dsv global), not dsv.
d3-dsv module (and d3_dsv global), not dsv.Nothing published for this version
Adjust the package.json definition for npm users.
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →