src/streams/csv-parse-stream.js
// Assumes the first line is the header with the names of the fields.
Assumes the first line is the header with the names of the fields.
Assumes the first line is the header with the names of the fields .
function CsvParseStream(options) {
  if (!(this instanceof CsvParseStream)) {
    return new CsvParseStream(options);
  }
  Transform.call(this, options);
  this._writableState.objectMode = false;
  this._readableState.objectMode = true;
  this._buffer = '';
  this._decoder = new StringDecoder('utf8');
  this._readHeader = true;
  this._names = [];
  this._csv = new CSV();
}
function CsvParseStream ( options ) { if ( ! ( this instanceof CsvParseStream ) ) { return new CsvParseStream ( options ) ; } Transform . call ( this , options ) ; this . _writableState . objectMode = false ; this . _readableState . objectMode = true ; this . _buffer = '' ; this . _decoder = new StringDecoder ( 'utf8' ) ; this . _readHeader = true ; this . _names = [ ] ; this . _csv = new CSV ( ) ; }
Assumes the first line is the header with the names of the fields.
Assumes the first line is the header with the names of the fields .