uDSV (μDSV) is a lightweight and exceptionally fast JavaScript library for parsing CSV strings, adhering mostly to RFC 4180. Currently at version 0.7.3, it maintains an active release cadence with frequent minor updates. A key differentiator is its "Ludicrous Speed™" performance, consistently outperforming popular alternatives like Papa Parse by 2x-5x across various datasets and parsing configurations, ensuring high speed not just on simplified "happy paths." The library is designed for the 99.5% use-case, minimizing complexity and performance trade-offs, making it ideal for robust, high-throughput parsing. It offers both full and incremental parsing, automatic delimiter detection, schema inference with value typing (`string`, `number`, `boolean`, `date`, `json`), and flexible output formats including arrays, objects, and columnar arrays, all within a compact 5KB (minified) footprint and ships with TypeScript types.
npm install udsvVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to infer a schema from a CSV string, initialize the parser, and then parse the data into both raw string arrays and schema-typed objects for easier manipulation.
Ensure consistent line ending usage across the entire CSV file, particularly within quoted fields, to match the chosen row delimiter. Most tools can standardize line endings.
If `unsafe-eval` cannot be enabled in your CSP, you must manually perform type conversions on the raw string outputs provided by `parser.stringArrs()` or similar methods.
Either adjust your CSP to allow `unsafe-eval` (if your security policy permits), or switch to using `parser.stringArrs()` to get raw string outputs and implement manual type conversion logic in your application.
Verify that your CSV strictly adheres to RFC 4180. Ensure no extraneous characters exist after quoted fields before a delimiter or newline. Also, confirm that all line breaks inside quoted fields are identical to the file's primary row delimiter.
No dependency data recorded yet.