CSVParse for Node.js


Option raw

The raw option generates two properties raw and record instead of just the record. The raw property is the original CSV content and the record property is the parsed array or object literral.

All options are compatible but the generated records are structured differently.

Its behavior is similar to the one of the info option. Both options can be used conjointly.


When the raw option is activated with the value true, the resulting record are made up of raw and record properties:

import assert from 'assert';
import { parse } from 'csv-parse';

`.trim(), {raw: true}, (err, records) => {
  assert.deepStrictEqual(records, [
    { record: [ 'a', 'b', 'c' ], raw: 'a,b,c\n' },
    { record: [ 'd', 'e', 'f' ], raw: 'd,e,f' }


The Node.js CSV project is an open source product hosted on GitHub and developed by Adaltas.