UNPKG

@postman/csv-parse

Version:

CSV parsing implementing the Node.js `stream.Transform` API

14 lines (11 loc) 276 B
const parse = require('../lib') const assert = require('assert') const input = '#Welcome\n"1","2","3","4"\n"a","b","c","d"' parse(input, { comment: '#' }, function(err, output){ assert.deepEqual( output, [ [ '1', '2', '3', '4' ], [ 'a', 'b', 'c', 'd' ] ] ) })