Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cfware/csv-parse
Tiny CSV string parser
https://github.com/cfware/csv-parse
Last synced: 29 days ago
JSON representation
Tiny CSV string parser
- Host: GitHub
- URL: https://github.com/cfware/csv-parse
- Owner: cfware
- License: mit
- Created: 2020-09-09T17:37:20.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-10-15T16:16:58.000Z (about 1 year ago)
- Last Synced: 2024-10-31T05:21:00.106Z (about 2 months ago)
- Language: JavaScript
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# @cfware/csv-parse [![NPM Version][npm-image]][npm-url]
Tiny CSV string parser
## Usage
```js
import parse from '@cfware/csv-parse';
```### parse(string, maxRows = Infinity)
Parse the JavaScript `string` into an array of rows where each row is an array of
columns. Setting `maxRows` causes the parse to escape early.## Attribution
This is based on code from [dom-csv.js] which is based on [ucsv]. The goal of this
rewrite is have the smallest possible ES module which parses CSV.[npm-image]: https://img.shields.io/npm/v/@cfware/csv-parse.svg
[npm-url]: https://npmjs.org/package/@cfware/csv-parse
[dom-csv.js]: https://github.com/okfn/csv.js
[ucsv]: https://github.com/uselesscode/ucsv