title: Reading from file with fast-csv and writing into an array
body: <p>I'm using <a href="https://www.npmjs.com/package/fast-csv" rel="noreferrer">fast-csv</a>'s <code>fromPath()</code> method to read data from a file. I would like to write this data into an array (which I will subsequently sort). I would expect the code below to work for this purpose, but it does not:</p>
  
  <pre><code>var csv = require('fast-csv');
  
  var dataArr = [];
  csv.fromPath("datas.csv", {headers: true})
  .on("data", data =&gt; {
    console.log(data);
    // &gt; { num: '4319', year: '1997', month: '4', day: '20', ...
    dataArr.push(data);
  });
  console.log(dataArr);
  // &gt; []
  </code></pre>
  
  <p>I am able to read the data in the file with this code, but the array is not populated.</p>
  
  <p>What is a good way to accomplish this, and why does the code above not work?</p>