A high-performance streaming CSV parser for Node.js that converts CSV to JSON at up to 90,000 rows per second.
csv-parser is a Node.js library for parsing CSV files using a streaming approach, converting CSV data into JSON objects. It solves the problem of efficiently processing large CSV files by handling them as streams, minimizing memory usage while maintaining high parsing speeds. The library focuses on performance, aiming to be faster than other CSV parsers, and ensures compatibility with various CSV formats through the csv-spectrum test suite.
Node.js developers who need to process CSV files, especially those working with large datasets, data pipelines, or applications requiring efficient CSV-to-JSON conversion. It's also suitable for CLI tool developers and those needing browser-compatible CSV parsing.
Developers choose csv-parser for its exceptional speed, streaming capabilities that handle large files without memory issues, and robust feature set including configurable parsing options and CLI support. Its compatibility with csv-spectrum ensures reliable parsing of diverse CSV formats.
Streaming csv parser inspired by binary-csv that aims to be faster than everyone else
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Processes CSV files as readable streams, enabling efficient handling of large datasets without loading everything into memory, as emphasized in the key features and usage examples.
Benchmarks show parsing rates up to 90,000 rows per second, with provided scripts like bin/bench.js to test on user data, highlighting its focus on speed.
Passes the csv-spectrum acid test suite, ensuring reliable parsing of various CSV edge cases and non-standard formats, which is a core claim in the README.
Offers extensive options like custom separators, quotes, escapes, headers, and strict mode validation, allowing precise control over parsing behavior as detailed in the API section.
Lacks a built-in promise-based API; developers must use neat-csv for async/await patterns, adding an extra dependency for modern workflows, as noted in the README.
Handling character encodings and Byte Order Marks requires additional modules like iconv-lite or strip-bom-stream, complicating setup for some CSV files, as admitted in the Encoding and Byte Order Marks sections.
While mapValues allows basic modifications, it doesn't offer advanced features like automatic type detection or comprehensive schema validation out of the box, which might be needed for complex data pipelines.
In non-strict mode, mismatched columns can cause incorrect property mapping, potentially leading to data integrity issues without careful handling, as warned in the strict option documentation.