Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sydev/p-csv-parser
A simple and blazing fast csv parser, promisified.
https://github.com/sydev/p-csv-parser
Last synced: 12 days ago
JSON representation
A simple and blazing fast csv parser, promisified.
- Host: GitHub
- URL: https://github.com/sydev/p-csv-parser
- Owner: sydev
- Archived: true
- Created: 2017-04-21T09:27:07.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-04-23T09:37:15.000Z (over 7 years ago)
- Last Synced: 2024-08-02T05:13:38.290Z (3 months ago)
- Language: JavaScript
- Size: 26.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-blazingly-fast - p-csv-parser - A simple and blazing fast csv parser, promisified. (JavaScript)
README
# p-csv-parser
[![Build Status](https://travis-ci.org/sydev/p-csv-parser.svg?branch=master)](https://travis-ci.org/sydev/p-csv-parser)
A simple and blazing fast csv parser, promisified.
## Table of contents
- [Installation](#installation)
- [Usage](#usage)
- [API](#api)
- [Development](#development)
- [Changelog](#changelog)## Installation
```
$ npm install --save p-csv-parser
```Or if you prefer yarn:
```
$ yarn add p-csv-parser
```## Usage
```JavaScript
const csvParser = require('p-csv-parser');csvParser(csvString)
.then(results => console.log(results)); // Array of rows as objects```
## API
### csvParser(csvString, options)
- ```csvString``` String (required) - The csv content to parse
- ```options``` Object (optional)
- ```headers``` Boolean|Array - If true, the first line of ```csvString``` is parsed as headers, else use the array. Default: ```true```
- ```delimiter``` String - Set the field delimiter, Default: ```","```## Development
```
$ npm test
```## Changelog
- 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