Skip to content

csv parser with automatic delimiter and encoding detection

Notifications You must be signed in to change notification settings

debitoor/csv-parser

Repository files navigation

csv-parser-2 Build Status

based on rfc4180, extended with popular needs

  • automatic delimiter detection
  • encoding detection and utf8 conversion
  • removing empty rows
  • trimming cells
var parser = require('csv-parser-2');

var data = parser(new Buffer('a,b\n1,2'));
console.log(data.rows); // [['a', 'b'],['1', '2']];

options

var parser = require('csv-parser-2');
var options = {
	secondaryDelimiter: true //parse with second most occurring delimiter
};
var data = parser(new Buffer('My, text, with, commas;b\nAnother, text, with, commas;2'), opts);
console.log(data.rows); // [['My, text, with, commas', 'b'],['Another, text, with, commas', '2']];

About

csv parser with automatic delimiter and encoding detection

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •