We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I only need the first few lines of data in the file to be displayed on the web page, how to avoid reading the entire file
The text was updated successfully, but these errors were encountered:
you can try to use the stream reader
const fs = require('fs') const csv = require('csvtojson') csv() .fromStream(fs.createReadStream('/pathToFile', { end: 1024 })) .subscribe((json) => { console.log(json) }, (err) => { throw err }, () => { console.log('success') })
Check the stremReaderOptions here
Sorry, something went wrong.
@hetao92 please close the issue if this solves your problem
No branches or pull requests
I only need the first few lines of data in the file to be displayed on the web page, how to avoid reading the entire file
The text was updated successfully, but these errors were encountered: