neat-csv
TypeScript icon, indicating that this package has built-in type declarations

7.0.0 • Public • Published

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

import neatCsv from 'neat-csv';

const csv = 'type,part\nunicorn,horn\nrainbow,pink';

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

The CSV data to parse.

options

Type: object

See the csv-parser options.

Dependents (102)

Package Sidebar

Install

npm i neat-csv

Weekly Downloads

223,319

Version

7.0.0

License

MIT

Unpacked Size

4.56 kB

Total Files

5

Last publish

Collaborators

  • sindresorhus