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

Stream support #9

Closed
kaue opened this issue Sep 23, 2016 · 4 comments
Closed

Stream support #9

kaue opened this issue Sep 23, 2016 · 4 comments

Comments

@kaue
Copy link
Owner

kaue commented Sep 23, 2016

This module needs to implement streaming to support huge CSVs, currently its using memory to save the csv output https://github.com/kauegimenes/jsonexport/blob/master/lib/index.js#L109

@kaue
Copy link
Owner Author

kaue commented Dec 20, 2016

@papswell Any ideas for this issue? =)

@papswell
Copy link
Collaborator

@kauegimenes i can try as soon as possible, but for now i can't afford to spend more time on it :s
Let's see in 2017 :)

@kaue
Copy link
Owner Author

kaue commented Jun 5, 2017

@papswell What you think about this implementation?

https://github.com/kauegimenes/jsonexport/tree/v2.0.0

@kaue kaue mentioned this issue Jun 6, 2017
@kaue
Copy link
Owner Author

kaue commented Jun 6, 2017

var jsonexport = require('jsonexport');
var fs = require('fs');

var reader = fs.createReadStream('data.json');
var writer = fs.createWriteStream('out.csv');

reader.pipe(jsonexport()).pipe(writer);

@kaue kaue closed this as completed Jun 6, 2017
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

2 participants