Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
fs.readFile(sample, 'UTF-8', (err, fileContent) => {
if (err) { console.log(err); }
csv.toArrays(fileContent, {}, (err, data) => {
if (err) { console.log(err); }
for (let i = 0, len = data.length; i < len; i++) {
console.log(data[i]);
}
});
});