UNPKG

@techmely/utils

Version:

Collection of helpful JavaScript / TypeScript utils

27 lines (22 loc) 480 B
/*! * @techmely/utils * Copyright(c) 2021-2024 Techmely <techmely.creation@gmail.com> * MIT Licensed */ import { readFile } from "./chunk-YCYRHAJ6.mjs"; // src/getDataPath.ts 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 };