A simple and blazing fast csv parser, promisified.
$ npm install --save p-csv-parser
Or if you prefer yarn:
$ yarn add p-csv-parser
const csvParser = require('p-csv-parser');
csvParser(csvString)
.then(results => console.log(results)); // Array of rows as objects
csvString
String (required) - The csv content to parseoptions
Object (optional)headers
Boolean|Array - If true, the first line ofcsvString
is parsed as headers, else use the array. Default:true
delimiter
String - Set the field delimiter, Default:","
$ npm test
- 1.0.2
- Fix error with large files. Tested with file containing roundabout 155000 lines
- 1.0.1
- Fix module error
- 1.0.0
- Initial Release