I was using the Readline module to rewrite a file line by line. While doing that I noticed that I had no idea which end-of-line (\r, \n, \r\n) caused the line break so I could not reassemble the file exactly as it was.
Of course I could detect the first EOL and then just use that for everything but in most cases I want to leave the line untouched anyway. Wouldn't it be a good idea to pass the found EOL string as a second argument to the callback of a line event emitted by a readline.Interface?