Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

use along with RxNode #214

Closed
ZigGreen opened this issue Feb 20, 2018 · 0 comments
Closed

use along with RxNode #214

ZigGreen opened this issue Feb 20, 2018 · 0 comments

Comments

@ZigGreen
Copy link

ZigGreen commented Feb 20, 2018

The problem is:
when I try to pass a csv stream to NodeRx.fromStream it has no effect.

var fs = require('fs');
var csv = require('fast-csv');
var stream = fs.createReadStream("file.csv");

var RxNode = require('rx-node');

var subscription = RxNode.fromStream(stream.pipe(csv()))
    .subscribe(function (x) {
        console.log(x); 
});

I've took a brief look at the fromStream source code and it seems to be that addListener('data', ...) has no effect on stream.pipe(csv()) stream. I wonder why.

If I change addListener('data', ...) to on('data', ...) in the NodeRx sources, It starts working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants