Option quoted_string

Table of Contents

Quote all fields of type string. This option apply even when there is no character requiring quotes.

Note, several options are available to control when to quote fields under certain conditions. Make sure to review the alternatives.


The quoted_string example illustrates that only fields of type string, empty or not, are quoted.

const parse = require('csv-parse')
const assert = require('assert')

  ['1', '', true, 2],
], {
  quoted_string: true
}, function(err, records){
  assert.equal(records, '"1","",1,2\n')