node-readlines
node-readlines copied to clipboard
Read large text files line by line (synchronous) for Node.js
Iterating over lines need not be connected to node's fs API.
In my opinion having next() return Buffer | false make this module hard to work with on TypeScript.
Hi everybody, I read a log file with the following code: ` const liner = new lineByLine(file_name); let valore ="\n\nContenuto log\n"; let l; while (line = liner.next()) { console.log(""+line); l+=""+line+"<br\>";...
Add support for STDIN by receiving file descriptor 0 as a valid argument and ignoring the position when reading from it as STDIN cannot be seeked (Perhaps we should prevent...
This library does not support reading from STDIN. My use case is to use it in piped inputs
Reading from a pipe can be useful (see also https://github.com/nacholibre/node-readlines/issues/26)
UTF-16
Any advise how to read utf-16 (LittleEndian) file info buffer. Tried normal way : ```` while (row = reader.next()) { line = row.toString('utf16le'); ........ } ```` but seems to be...
It seems that even though readFileSync reads whole file, it's still faster than this lib. I tested files with thousand lines...
The standard unix file descriptor for stdin is 0 (also available as process.stdin.fd), but this is not possible to use since 0 is a falsy value. This commit fixes this.