neat-csv is a lightweight, promise-based wrapper around the high-performance streaming `csv-parser` module, designed for quickly parsing CSV data from strings, buffers, or readable streams into an array of JavaScript objects. The current stable version is 7.0.0. While `csv-parser` focuses on stream-based processing, `neat-csv` offers a convenient, promise-returning API, making it ideal for scenarios where the entire CSV content is available upfront or can be easily buffered. Its release cadence is tied to updates in Node.js compatibility and significant changes in its underlying `csv-parser` dependency. A key differentiator is its straightforward API for non-streaming use cases, abstracting away stream handling complexities while retaining the performance benefits of its core parser. Since version 7.0.0, the package is pure ESM, requiring modern Node.js environments and import syntax.
npm install neat-csvVerified import paths — ran on the pinned version, not inferred.
Demonstrates parsing CSV data from strings, buffers, and Node.js readable streams, including passing options for custom delimiters.
Migrate your project to use ES modules (`"type": "module"` in `package.json` or `.mjs` files) and use `import neatCsv from 'neat-csv';`.
Upgrade your Node.js runtime to version 12.20.0, 14.13.1, 16.0.0, or newer.
Upgrade your Node.js runtime to version 10 or newer.
Before opening an issue for `neat-csv`, check the `csv-parser` repository for existing issues or report it there if it's a core parsing problem.
Upgrade to `neat-csv` v5.2.0 or newer to take full advantage of generic TypeScript row typing.
Switch to ES module import syntax: `import neatCsv from 'neat-csv';` and ensure your project is configured for ESM.
Ensure you are using `import neatCsv from 'neat-csv';` for ESM projects and that your Node.js version meets the package requirements.
Add `"type": "module"` to your `package.json` file or rename your file to `.mjs` to explicitly declare it as an ES module.