title: How to return Papa-parsed CSV via promise/async-await
body: <p>Can someone help me understand why this returns a pending promise, rather than the data?</p>
  
  <pre><code>async function toJson (filepath) {
    const file = fs.createReadStream(filepath)
    let json = new Promise((resolve, reject) =&gt; {
      Papa.parse(file, {
        header: true,
        complete (results, file) {
          resolve(results)
        },
        error (err, file) {
          reject(err)
        }
      })
    })
    let result = await json
    return result.data
  }
  </code></pre>
  
  <p>If I change the <code>return result.data</code> line to <code>console.log(result.data)</code>, it logs the data array to the console, as expected. Why won't it simply return that array?!?!</p>