StripLines - Stripe Lines with Ease
A super simple library to remove the first X lines from an inputstream. Best of all, it only uses core Nodejs, no 3rd party dependencies!
npm install striplines --save
Here is a basic example showing how to remove lines from a file and pipe it to another file.
"use strict";var striplines = ;var fs = ;var input = fs;var output = fs;input;
How it works
This is a simple use of Stream.Transform. All this is really doing is breaking the input chunk into an array separated by found new line characters ('\n'). It then uses Array.shift() until the removed amount reaches the amount you specified.
It's that simple.