PapaParse
Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input
by mholtJavaScript
Commit activity
Last 12 weeks · 21 commits
Community health
2 of 6 standards met
Recent PRs & issues
Add to for the custom export labels requested in #1036. It changes only the emitted header label: object values are still read using the original fields, and input rows/field arrays remain unchanged. The transformed label goes through the existing quoting, escaping and formula-protection path. The callback runs once per emitted header, including header-only exports, and is not called when headers are disabled or absent. Documentation and the generated browser bundle are updated. Validation: Five new feature cases fail on the baseline. Node suite: 272 passing, 25 pending. Headless Chromium suite: 276 passing, 8 pending. ESLint and Grunt build pass; minified browser entry smoke-tested. Tests cover column order, explicit fields, empty data, disabled headers, escaping, callback count, input preservation and callback errors. Closes #1036.
getWorkerBlob() re-executes moduleFactory.toString() in the worker's sloppy-mode global scope. The factory's own 'use strict' directive is supposed to travel with the stringified source, but when PapaParse is bundled into an ES module the directive is redundant there, and modern minifiers (e.g. oxc in rolldown/Vite 8) legally strip it. The same minifiers also merge functions and reuse identifiers in ways that are only equivalent in strict mode, such as giving a block-level function declaration the same name as a function-scoped one. Re-run sloppy, Annex B hoisting lets the block-level declaration clobber the outer one, and with header: true every parsed row comes back undefined. Prefix the blob prologue with 'use strict' so the worker always runs with the semantics the source was written and bundled with.
Fixes #1084. Targets , following the maintainer's release-scope decision. What With , currently produces . This changes it to , alongside the existing lowercase and uppercase forms. Update boolean conversion in the direct parser, parser handle, and exported dynamic typing helper. The regressions cover fast and standard parsing, quoted fields, disabled typing, column selection, and header callbacks. Unsupported mixed-case spellings and surrounding whitespace stay as strings. The shared v5/v6 test now uses / for rejected spellings; title-case conversion is covered by the v6-specific tests. records the change as requested by the repository guide. Test plan Reproduced 10 failing regression checks before the fix; all pass afterward. : 279 passing. : 176 passing, 4 skipped. , , , and : passing. Built Node and browser bundles: 12 boolean-conversion assertions passing. On Windows with Node 20.10.0 and Bun 1.3.11, both and report 243 passing, 23 pending, and one failure: the existing pause/resume test for #636 exceeds its 30-second timeout. The headless browser suite, run through a Windows-compatible launcher, reports the same 236 passing, 8 pending, and 10 failures before and after this patch (worker loading, pause/resume, and chunked-download cursor tests).
Repository: mholt/PapaParse. Description: Fast and powerful CSV (delimited text) parser that gracefully handles large files and malformed input Stars: 13590, Forks: 1207. Primary language: JavaScript. Languages: JavaScript (90.7%), CSS (7.2%), HTML (2%). License: MIT. Homepage: http://PapaParse.com Topics: csv, csv-parser, javascript. Latest release: 5.7.0 (1mo ago). Open PRs: 60, open issues: 183. Last activity: 1w ago. Community health: 42%. Top contributors: mholt, pokoli, bluej100, gabegorelick, Turbo87, janisdd, MonkeyDZeke, robd, jsg2021, dboskovic and others.