title: node.js: read a text file into an array. (Each line an item in the array.)
body: <p>I would like to read a very, very large file into a JavaScript array in node.js.</p>
  
  <p>So, if the file is like this:</p>
  
  <pre><code>first line
  two 
  three
  ...
  ...
  </code></pre>
  
  <p>I would have the array: </p>
  
  <pre><code>['first line','two','three', ... , ... ] 
  </code></pre>
  
  <p>The function would look like this:</p>
  
  <pre><code>var array = load(filename); 
  </code></pre>
  
  <p>Therefore the idea of loading it all as a string and then splitting it is not acceptable.</p>