csv-stringify
CSV stringifier implementing the Node.js `stream.Transform` API
Last updated 2 years ago by david .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ gnpm install csv-stringify 
SYNC missed versions from official npm registry.

CSV stringifier for Node.js and the web

Build Status NPM NPM

The csv-stringify 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.

Documentation

Main features

  • Follow the 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
  • Only 1 external dependency
  • to be used conjointly with csv-generate, csv-parse and stream-transform
  • 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.

The module is built on the Node.js Stream API. Use the callback and sync APIs for simplicity or the stream based API for scalability.

Example

The API is available in multiple flavors. This example illustrates the sync API.

import { stringify } from 'csv-stringify/sync';
import assert from 'assert';

const output = stringify([
  [ '1', '2', '3', '4' ],
  [ 'a', 'b', 'c', 'd' ]
]);

assert.equal(output, '1,2,3,4\na,b,c,d\n');

Development

Tests are executed with mocha. To install it, run npm install followed by npm test. It will install mocha and its dependencies in your project "node_modules" directory and run the test suite. The tests run against the CoffeeScript source files.

To generate the JavaScript files, run npm run build.

The test suite is run online with Travis. See the Travis definition file to view the tested Node.js version.

Contributors

The project is sponsored by Adaltas, an Big Data consulting firm based in Paris, France.

Current Tags

  • 6.3.0                                ...           latest (2 years ago)

72 Versions

  • 6.3.0                                ...           2 years ago
  • 6.2.4                                ...           2 years ago
  • 6.2.3                                ...           2 years ago
  • 6.2.2                                ...           2 years ago
  • 6.2.1                                ...           2 years ago
  • 6.2.0                                ...           2 years ago
  • 6.1.3                                ...           2 years ago
  • 6.1.2                                ...           2 years ago
  • 6.1.1                                ...           2 years ago
  • 6.1.0                                ...           3 years ago
  • 6.0.5                                ...           3 years ago
  • 6.0.4                                ...           3 years ago
  • 6.0.3                                ...           3 years ago
  • 6.0.2                                ...           3 years ago
  • 6.0.1                                ...           3 years ago
  • 6.0.0                                ...           3 years ago
  • 5.6.5                                ...           3 years ago
  • 5.6.4                                ...           3 years ago
  • 5.6.2                                ...           4 years ago
  • 5.6.1                                ...           4 years ago
  • 5.6.0                                ...           4 years ago
  • 5.5.3                                ...           4 years ago
  • 5.5.2                                ...           4 years ago
  • 5.5.1                                ...           4 years ago
  • 5.5.0                                ...           5 years ago
  • 5.4.3                                ...           5 years ago
  • 5.4.2                                ...           5 years ago
  • 5.4.1                                ...           5 years ago
  • 5.4.0                                ...           5 years ago
  • 5.3.6                                ...           5 years ago
  • 5.3.5                                ...           5 years ago
  • 5.3.4                                ...           5 years ago
  • 5.3.3                                ...           5 years ago
  • 5.3.2                                ...           5 years ago
  • 5.3.1                                ...           5 years ago
  • 5.3.0                                ...           6 years ago
  • 5.2.0                                ...           6 years ago
  • 5.1.2                                ...           6 years ago
  • 5.1.1                                ...           6 years ago
  • 5.1.0                                ...           6 years ago
  • 5.0.0                                ...           6 years ago
  • 4.3.1                                ...           6 years ago
  • 4.3.0                                ...           6 years ago
  • 4.2.0                                ...           6 years ago
  • 4.1.0                                ...           6 years ago
  • 4.0.1                                ...           6 years ago
  • 4.0.0                                ...           6 years ago
  • 3.1.1                                ...           6 years ago
  • 3.1.0                                ...           6 years ago
  • 3.0.0                                ...           7 years ago
  • 2.1.0                                ...           7 years ago
  • 2.0.4                                ...           7 years ago
  • 2.0.3                                ...           7 years ago
  • 2.0.2                                ...           7 years ago
  • 2.0.1                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.1.2                                ...           7 years ago
  • 1.1.1                                ...           7 years ago
  • 1.1.0                                ...           7 years ago
  • 1.0.4                                ...           9 years ago
  • 1.0.3                                ...           9 years ago
  • 1.0.2                                ...           9 years ago
  • 1.0.1                                ...           9 years ago
  • 0.0.8                                ...           9 years ago
  • 0.0.7                                ...           10 years ago
  • 0.0.6                                ...           10 years ago
  • 0.0.5                                ...           10 years ago
  • 0.0.4                                ...           10 years ago
  • 0.0.3                                ...           10 years ago
  • 0.0.2                                ...           11 years ago
  • 0.0.1                                ...           11 years ago
  • 0.0.0                                ...           11 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dependencies (0)
None
Dev Dependencies (17)
Dependents (1)

Copyright 2013 - present © cnpmjs.org | Home |