Skip to content

createCsvStreamRead readStream set to undefined? #21

Description

@dereke

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?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions