readline-promise
readline-promise copied to clipboard
Read file with a LF at the end
Hi,
I was testing the module with a file having a LF character as the latest character and it looks like it is not working properly. There is no error message so it's difficult to figure out what the problem is.
I have tested the same file with the standard readline module and it works fine.
I was using it like this : await rlp.forEach((line, index) => { console.log(line); })
Could someone test and let me know if you get the same issue?
Please provide a test file and code to reproduce
See : https://github.com/JuustoMestari/readline-promise
I've confirmed this bug on my own test file. Removing the final LF character enable the promise to resolve.
Inserting a zero-length line anywhere in __test__/file.txt causes the unit tests to fail.
Any chance this will be updated? Running into this issue as well
i added some test cases which all passed on the current code. I have also updated the dev deps and published v1.0.5 please see if your issues are resolved.