Getting started
Introduction
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.
Project organisation
The csv
package is an umbrella project exposing 4 packages:
csv-generate
A flexible generator of CSV string and Javascript objects.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.
Each package's code is versioned under the Node.js CSV monorepo.
Usage
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 APIs are also provided for convenience such as the callback and sync APIs.
For additional usage and examples, you may refer to the example page.