( filepath: string, data: unknown, indent: number = 2, )
| 108 | * Writes an object to a JSON file with proper formatting |
| 109 | */ |
| 110 | export async function writeJsonFile( |
| 111 | filepath: string, |
| 112 | data: unknown, |
| 113 | indent: number = 2, |
| 114 | ): Promise<void> { |
| 115 | const content = JSON.stringify(data, null, indent); |
| 116 | await writeFileContent(filepath, content); |
| 117 | } |
| 118 | |
| 119 | /** |
| 120 | * Checks if a directory exists and is actually a directory |
no test coverage detected
searching dependent graphs…