dsv

A parser and formatter for DSV (CSV and TSV) files.

DSV Parser and Formatter

Extracted from D3.

To use in Node.js, npm install dsv, and then:

var dsv = require("dsv"),
    csv = dsv(",");
 
console.log(csv.parse("foo\n1")); // [{foo: 1}] 

To use in the browser:

<script src="dsv.js"></script>
<script>
 
var csv = dsv(",");
 
console.log(csv.parse("foo\n1"));
 
</script> 

For more usage, see D3's wiki page.