GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • GitHub
  • Generate
  • Parse
  • Transform
  • Stringify
  • How to contribute
  • GitHub
  • Issue Tracker
  • License
  • Homepage
  • Converter
  • API
  • Stream
  • Callback

This view

  • Original page
  • New address

GeezerVison is showing csv.js.org — CSV Project - Node.js CSV package

csv-generate

CSV Generate build status NPM version

Write random and user-defined strings, objects and arrays

csv-parse

CSV parse build status NPM version

Read CSV strings and buffers and write object and arrays

stream-transform

Stream transform build status NPM version

Read and write objects and arrays

csv-stringify

CSV stringify build status NPM version

Read object and arrays and write CSV strings

CSV & JSON converter tool

This is a full-featured CSV parsing tool running entirely on your browser. No data leave your computer ! Use it also to learn how to use our packages and to test the various options interactively.

Latest news

New `comment_no_infix` option.

By wdavidw | August 25th, 2023

Version 5.5.0 of csv-parse include the new [`comment_no_infix` option](/parse/options/comment_no_infix/). When activate, comments may only start at the beginning of a line.

CSV package version 6 with ECMAScript modules support

By wdavidw | November 13th, 2021

Version 6 of the csv package for Node.js is released along its sub projects. Read about the new features and the breaking changes (fr) introduced by this new version.

Migrating all the projects as one Git monorepo.

By wdavidw | August 27th, 2021

A few weeks ago, we migrated the 5 repositories in one Git monorepo. If interested in the details, read our article on how we merged the repositories while preserving the commit history.

Try the new CSV & JSON conversion tool!

By wdavidw | January 15th, 2019

We just published a new conversion tool which takes a CSV input and convert it to JSON. Use it as a playground to learn how to use our packages, test your options interactively or as a full-featured CSV parsing tool.

CSV Stringify 5.1.0

By wdavidw | December 5th, 2018

Casting user functions are now called with a context object. The initial properties are "column", "header", "index", "records".

CSV 5.0.0

By wdavidw | November 21th, 2018

Version 5.0.0 includes the latest csv-parse and csv-stringify respectively with version 4.0.1 and 5.0.0.

CSV Stringify 5.0.0

By wdavidw | November 21th, 2018

Version 5.0.0 introduces the new quoted_match option and support options written both in the underscore and camelcase forms. Some options were renamed. Thus rowDelimiter is now record_delimiter and formatters is now cast. Read the changelog!

CSV Parse 4.0.0 - re-writing and performance

By wdavidw | November 19th, 2018

Version 4.0.0 is a complete re-writing of the project focusing on performance. It also comes with new functionalities as well as some cleanup in the option properties and the exported information. The official website is updated and the changelog contains the list of changes for this major release. Learn more!

Quick sync example

import assert from "node:assert";
import { generate, parse, transform, stringify } from "csv/sync";

// Run the pipeline
const input = generate({ seed: 1, columns: 2, length: 2 });
const rawRecords = parse(input);
const refinedRecords = transform(rawRecords, (data) =>
  data.map((value) => value.toUpperCase())
);
const output = stringify(refinedRecords);
// Print the final result
assert.equal(output, `OMH,ONKCHHJMJADOA
D,GEACHIN
`);

Quick stream pipe example

// Import the package
import * as csv from 'csv';

// Run the pipeline
csv
  // Generate 20 records
  .generate({
    delimiter: '|',
    length: 20
  })
  // Transform CSV data into records
  .pipe(csv.parse({
    delimiter: '|'
  }))
  // Transform each value into uppercase
  .pipe(csv.transform((record) =>
    record.map((value) =>
      value.toUpperCase()
    )
  ))
  // Convert objects into a stream
  .pipe(csv.stringify({
    quoted: true
  }))
  // Print the CSV stream to stdout
  .pipe(process.stdout);
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.