(path: string)
| 63 | // --- File I/O Helpers --- |
| 64 | |
| 65 | function readJsonSafe(path: string): any { |
| 66 | try { |
| 67 | return JSON.parse(readFileSync(path, 'utf-8')) |
| 68 | } catch { |
| 69 | return {} |
| 70 | } |
| 71 | } |
| 72 | |
| 73 | function writeJsonSafe(path: string, data: any) { |
| 74 | const dir = dirname(path) |
no test coverage detected