import CSV from 'ex-stream/CSV';
Parse CSV stream text data to objects
import { createReadStream } from 'fs';
import { csv } from 'ex-stream/CSV';
import { log } from 'ex-stream/LogStream';
createReadStream('data.csv')
.pipe(csv({ escape = '"', quote = '"', delimiter = ',', newLine = '\n' }))
.pipe(log());
fileStream.pipe(csvStream);
Parameters:
options.escape
:String=
- Escape stringoptions.quote
:String
- Quote stringoptions.delimiter
:String
- Delimiter stringoptions.newLine
:String
- new line stringoptions
:Object
- Stream options
Creates CSV stream instance
new CSV({ escape = '"', quote = '"', delimiter = ',', newLine = '\n' });
import { csv } from 'ex-stream/CSV';
CSV Stream factory function
function csv(options)