Files
converter-csv-to-json/index.js
2022-06-04 15:37:45 -04:00

13 lines
281 B
JavaScript

const { readFile } = require('./utils/converter')
const add = async (path) => {
try {
if (typeof path !== 'string') throw new Error('path have to be an string')
return await readFile(`${path}`)
} catch (e) {
throw new Error(e.message)
}
}
module.exports = add