Process a file and return the results as a promise
$ npm install --save process-file
const csvParser = require('csv-parser');
const processFile = require('process-file');
processFile('unicorn.csv', csvParser()).then(data => {
console.log(data);
//=> [{foo: 'bar', unicorn: 'awesome'}]
});
Returns a promise that resolves to your processed result.
Required
Type: string, buffer
File to process.
Required
Type: object
Stream to process the file with.
MIT © Kevin Mårtensson