File Stream's Nth Line

Nth Line

In nodejs, when reading a stream from a file, the process of getting the nth line requires reading (nth - 1) lines. A filestream’s data comes as it is ready and in order, but there is no means of jumping to a specific nth line of the stream.

This is a inconvenience but this required behavior of ‘iterating through the lines until the desired line is found’ is also present in many other programming languages.