ES7 async wrapper for csv package
This is a wrapper for the popular
csv package in NPM that can be used with the ES7 async-await pattern, instead of using callbacks.
If you just want to read a CSV file
const csv = ;const fs = promises;async// Read file from disk:const csvString = await fs;// Convert CSV string into rows:const rows = await csv;;
For all documentation, please see the documentation for the csv package.
All parameters are the same as for the functions in the
csv module, except that you need to omit the callback parameter.
If there is any error returned by the
csv package, an exception will be thrown.
const csv = ;// `options` are optionallet result1 = await csv;let result2 = await csv;let result3 = await csv;let result4 = await csv;
Feedback, bug reports and pull requests are welcome. See the linked Github repository.