createCsvStreamRead readStream set to undefined? #21

dereke opened this Issue Sep 21, 2012 · 0 comments


None yet
1 participant

dereke commented Sep 21, 2012

This is more of a question than an issue. This method (createCsvStreamReader) sets the readStream to undefined if no options are passed through:

csv.createCsvStreamReader = function(readStream, options) {
    if (options === undefined && typeof readStream === 'object') {
        options = readStream;
        readStream = undefined;
    options = options || {};
    if (readStream) readStream.setEncoding(options.encoding || 'utf8');
    return new CsvReader(readStream, options);

It seem like really strange behaviour, and my reader was not receiving any events because of this. Is this actually intended behaviour?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment