CSVParse for Node.js

IssuesGitHub

Option relax_quotes

The relax_quotes option preserves quotes inside unquoted field.

Usage

The second field is not quoted and it contains a quote character inside:

import assert from "node:assert";
import { parse } from "csv-parse";

parse(
  'a,some"text,c',
  {
    relax_quotes: true,
  },
  (err, records) => {
    assert.deepStrictEqual(records, [["a", 'some"text', "c"]]);
  },
);

About

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