UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

15 lines (12 loc) 344 B
import { readFile } from './chunk-YCYRHAJ6.mjs'; import path from 'path'; async function getDataPath(directoryPath, fileName) { const filePath = path.join(directoryPath, fileName); const fileContent = await readFile(filePath); const data = JSON.parse(fileContent); return { path: filePath, data }; } export { getDataPath };