CSV stringifier for Node.js
This package is a stringifier converting records into a CSV text and implementing the Node.js stream.Transform
API. It also provides the easier synchronous and callback-based APIs for conveniency. It is both extremely easy to use and powerful. It was first released in 2010 and is tested against big data sets by a large community.
Source code for this project is available on GitHub.
Main features
- Extends the native Node.js streaming API
- Simplicity with the optional callback API
- Support for custom formatters, delimiters, quotes, escape characters and header
- Support big datasets
- Complete test coverage and samples for inspiration
- No external dependency
- Work nicely with the csv-generate, csv-parse and stream-transform packages
- MIT License
Usage
Run npm install csv
to install the full csv module or run
npm install csv-stringify
if you are only interested by the CSV stringifier.
Use the stream based API for scalability and the sync or mixed APIs for simplicity.
The source code uses modern JavaScript features and run natively in Node 7.6+. For older browsers or older versions of Node, use the modules inside "./lib/es5".
Additional help
For usage and examples, you may refer to example page, the "samples" folder and the "test" folder.