Node.js start reading a file on a specific line
<p>On Node.js we can read a file line by line using the <code>readline</code> module:</p>

<pre><code>var fs = require('fs');
var readline = require('readline');

var rl = readline.createInterface({
    input: fs.createReadStream('filepath');
});

rl.on('line', function(line) {
    console.log(`Line read: ${line}`);
});
</code></pre>

<p>But what if we want to start reading on a specific line number? I know that when we use the <code>createReadStream</code> we can pass in a <code>start</code> parameter. This is explained in the docs:</p>

<blockquote>
  <p><code>options</code> can include <code>start</code> and <code>end</code> values to read a range of bytes from the file instead of the entire file.</p>
</blockquote>

<p>But here <code>start</code> is one offset in bytes, so it seems complicated to use this to set the starting line.</p>

<p>How can we adapt this approach to start reading a file on a specific line?</p>