growwapi
Version:
NodeJS SDK for Groww trading APIs
14 lines (13 loc) • 341 B
JavaScript
import fs from 'fs';
import path from 'path';
export function readCSVFile(filePath) {
try {
const absolutePath = path.resolve(filePath);
const data = fs.readFileSync(absolutePath, 'utf-8');
return data;
}
catch (error) {
console.error('Error reading CSV file:', error);
return '';
}
}