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

Nodejs stream - support object mode #652

Open
dsbert opened this issue Apr 1, 2019 · 1 comment
Open

Nodejs stream - support object mode #652

dsbert opened this issue Apr 1, 2019 · 1 comment

Comments

@dsbert
Copy link

dsbert commented Apr 1, 2019

Upon further research, #568 indicates unparse does not support streaming at all.

The documentation for Nodejs stream support seems a bit limited and I'm not able to get it working in object mode. I'm getting an error when I attempt the following. Is object mode streaming supported?

Unable to serialize unrecognized input

const readable = new Readable({ objectMode: true, highWaterMark: 10000 })

// ...

const parser = Papa.unparse(Papa.NODE_STREAM_INPUT, {
  fastMode: true
});

pipeline(
  readable,
  through2.obj(function p(chunk, enc, cb) {
  // do stuff with data
  // chunk is a js object
    cb(null, chunk);
  }),
  parser,
  res
);
@pokoli
Copy link
Collaborator

pokoli commented Apr 2, 2019

Any pull request improving nodejs stream support is very welcome.

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

No branches or pull requests

3 participants