UNPKG

debt-collector

Version:

a nodejs tool to identify, track and mesure technical debt

14 lines (13 loc) 398 B
import fs from 'fs'; export const writeResultInCache = (data, filename) => { const cachePath = `${process.cwd()}/node_modules/.cache/debt-collector`; try { if (!fs.existsSync(cachePath)) { fs.mkdirSync(cachePath, { recursive: true }); } fs.writeFileSync(`${cachePath}/${filename}`, data); } catch (error) { console.error(error); } };