This project provides CSV generation, parsing, transformation and serialization for Node.js.
It has been tested and used by a large community over the years and should be considered reliable. It provides every option you would expect from an advanced CSV parser and stringifier.
csv package is an umbrella which is itself split into 4 packages:
csv-parse, a parser converting CSV text into arrays or objects.
stream-transform, a transformation framework.
csv-stringify, a stringifier converting records into a CSV text.
It means you can either install the
csv package directly or selectively install one of its child projects to decrease your dependencies.
Installation command is
npm install csv. If using Yarn, run
yarn add csv.
The main modules are fully compatible with the Node.js native stream API. Alternative API are also provided for conveniency such as the callback, sync and promise APIs.
For additional usage and examples, you may refer to the example page.