How do I read the first non-empty line from a text file, in plain javascript, possibly by using a new FileReader()?
I wish to get only the first non-empty line, not the whole text in the file (which might be enormous). By "non-empty line" I mean a line ending with \r\n and containing some non-blank char.
One of my practical goals could be to pick the first "good" line in a huge CSV file, to possibly get the "headers" (names of variables of the dataset).
The file I wish to read is now locally on my hard disk, but when the script is ready, I would also like to put it online on my domain along with the script to process it.
Thank you!