I am using readline rd.on('line', function(line) {..... to read in a file line by line. I want to then just consume the file one line at a time starting from the first line and proceeding to the end of the file.
It seems "unshift" on an Array (in order to create a Queue to retain the order) can only take a literal and not a variable.
The main and apparently simplest solution I see for this is to read the file and process int into a string and split(\n) into an array.
Is there a "better" way? This seems to consume a huge amount of memory and has limits as a result.