title: Trying to parse csv file into array of objects
body: <p>I have stored CSV files within my application. I want to convert it to an array of objects. 
  I'm using csv-parse. 
  <a href="https://www.npmjs.com/package/csv-parse" rel="nofollow noreferrer">https://www.npmjs.com/package/csv-parse</a></p>
  
  <p>error message for just requiring the csv file </p>
  
  <p>error:</p>
  
  <blockquote>
    <p>Ingredient #, Ingredient Description, Cycle Count
               ^</p>
    
    <p>SyntaxError: Invalid or unexpected token</p>
  </blockquote>
  
  <pre><code>const parse = require('csv-parse/lib/sync');
  const assert = require('assert');
  const router = require('express').Router();
  const count = require("./csv/IngCountCycle.csv");
  
  router.get('/', function () {
      console.log("HI");
  
      const input = `
  "key_1","key_2"
  "value 1","value 2"
  `;
      const records = parse(input, {
          columns: true,
          skip_empty_lines: true
      });
  
      console.log(records)
      //output ([{key_1: 'value 1', key_2: 'value 2'}])
  });
  
  module.exports = router;
  </code></pre>
  
  <p>test.csv</p>
  
  <pre><code>Ingredient #, Ingredient Description, Cycle Count
  1,GUACAMOLE,Annually,
  2,GUACAMOLE,Period,
  3,GUACAMOLE,Weekly,
  4,GUACAMOLE,Custom
  </code></pre>
  
  <p>testParse.js</p>
  
  <pre><code>const parse = require('csv-parse/lib/sync');
  const assert = require('assert');
  const router = require('express').Router();
  const count = require("./csv/IngCountCycle.csv");
  
  router.get('/', function () {
      const input = count;
      const records = parse(input, {
          columns: true,
          skip_empty_lines: true
      });
  
      console.log(records)
  });
  
  module.exports = router;
  
  </code></pre>