Fast CSV parser
Convenience wrapper around the super-fast streaming csv-parser
module. Use that one if you want streamed parsing.
Parsing-related issues should be reported to csv-parser
.
$ npm install neat-csv
const neatCsv = require('neat-csv');
const csv = 'type,part\nunicorn,horn\nrainbow,pink';
(async () => {
console.log(await neatCsv(csv));
//=> [{type: 'unicorn', part: 'horn'}, {type: 'rainbow', part: 'pink'}]
})();
Returns a Promise<object[]>
with the parsed CSV.
Type: string | Buffer | stream.Readable
CSV data to parse.
Type: object
See the csv-parser
options.