All Projects → sindresorhus → Neat Csv

sindresorhus / Neat Csv

Licence: mit
Fast CSV parser

Programming Languages

javascript
184084 projects - #8 most used programming language

neat-csv

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.

Install

$ npm install neat-csv

Usage

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'}]
})();

API

neatCsv(data, options?)

Returns a Promise<object[]> with the parsed CSV.

data

Type: string | Buffer | stream.Readable

CSV data to parse.

options

Type: object

See the csv-parser options.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].