6.4.6 • Published 2 months ago

csv-stringify v6.4.6

Weekly downloads
802,101
License
MIT
Repository
github
Last release
2 months ago

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.

@pnp/cli-microsoft365@crawlee/coredotclub-admin-web-backendwegdigital-clireach-ad-analyserbatch-processing-servicedeps-version-report@klearthinkk/yu-nestjs-tempxardazoikos-data@xavo/cli@horizon-protocol/horizon-data@synfutures/synfutures-data@secman/exporter@lotum/feedback@eapinc/utilsphinternal-apieyezonvite-plugin-email@rtgs-global/react-componentspetitions_scraper_npm@ui-youcheng-hsu/package-analysis-parserhahnbee-coredap-clidata-access-platform-cli@codiga/clisfdx-hardis@everything-registry/sub-chunk-1422@aoflow/jsforce@apefinance/apes-data@alinex/datastore@alpaca-travel/import-streams@aappddeevv/dynamics-client@apostrophecms/piece-type-exporter@dapplion/benchmark@dapp.xyz/node-common@dhedegaard/s3-access-logs-to-csv@digitallinguistics/concordance@curveball/a12n-server@data-fair/processing-banatic@data-fair/processing-cogapi@data-fair/processing-export-file@data-fair/processing-majic@data-fair/processing-rna@data-fair/processing-rne@data-fair/processing-sirene@data-fair/processing-transform-csv@dodona/dolos@domain.js/main@domain.js/router@dorgtech/daocreator-lib@dorgtech/daocreator-lib-experimental@drdanryan/csv-translator@drdanryan/data-parser@dataflow-designer/stupendous-parser@dawadk/import-util@easyv/csv@dwmkerr/lifeline@dynoscale/dynoscale@eggsy001/npm-verify@ehs-service/firebase-functions@eeacms/search@eeacms/volto-searchlib@empatica/source-map-sbom@emuanalytics/flow-cli@ellreka/figma-comments-to-csvhumane-pipelinedocusign-esigndocusign-maestrodocusign-monitordocusign-roomsdocusign-webformsdocusign-admindocusign-click@alfonsobries/xlsx-laravel-spreadsheet-importerdive-dsaditto-swap@coolgk/utils@coolgk/csv@danielcalle/sfdx-scannerdocsgen@horizon-protocol/data@hydrant/lang-conversion@hydrant/lizenserinoember-i18n-csveea-searchserver@fluidapps/csvify@genovaswap/genova-data@geocodeearth/geexpenses@kangafinance/kanga-dataexpress-on@kall/gtfs-table@keeveestore/csv@kibocommerce/import-export-cli@kibocommerce/intra-tenant-catalog-cloneevent-service-tasksevent-handler-tasksexp-node@koumoul/ademe-rge
6.4.6

2 months ago

6.4.5

4 months ago

6.4.3

6 months ago

6.4.2

8 months ago

6.4.4

6 months ago

6.4.1

8 months ago

6.3.2

1 year ago

6.4.0

11 months ago

6.3.4

12 months ago

6.3.3

12 months ago

6.3.0

1 year ago

6.2.4

1 year ago

6.2.1

1 year ago

6.2.3

1 year ago

6.2.2

1 year ago

6.1.3

2 years ago

6.2.0

2 years ago

6.1.0

2 years ago

6.1.2

2 years ago

6.1.1

2 years ago

6.0.5

2 years ago

6.0.1

2 years ago

6.0.0

2 years ago

6.0.3

2 years ago

6.0.2

2 years ago

6.0.4

2 years ago

5.6.5

3 years ago

5.6.4

3 years ago

5.6.2

3 years ago

5.6.1

3 years ago

5.6.0

3 years ago

5.5.3

3 years ago

5.5.2

3 years ago

5.5.1

4 years ago

5.5.0

4 years ago

5.4.3

4 years ago

5.4.2

4 years ago

5.4.1

4 years ago

5.4.0

4 years ago

5.3.6

4 years ago

5.3.5

4 years ago

5.3.4

4 years ago

5.3.3

5 years ago

5.3.2

5 years ago

5.3.1

5 years ago

5.3.0

5 years ago

5.2.0

5 years ago

5.1.2

5 years ago

5.1.1

5 years ago

5.1.0

5 years ago

5.0.0

5 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

6 years ago

2.1.0

6 years ago

2.0.4

6 years ago

2.0.3

6 years ago

2.0.2

6 years ago

2.0.1

6 years ago

2.0.0

6 years ago

1.1.2

6 years ago

1.1.1

6 years ago

1.1.0

6 years ago

1.0.4

8 years ago

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

0.0.8

9 years ago

0.0.7

9 years ago

0.0.6

9 years ago

0.0.5

9 years ago

0.0.4

9 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago