(filename: string)
| 646 | * Try and read a file as a utf-8 json file, returning its contents if present, or undefined if not. |
| 647 | */ |
| 648 | export async function tryReadJsonFile(filename: string): Promise<any | undefined> { |
| 649 | const text = await tryReadTextFile(filename); |
| 650 | return text === undefined ? undefined : JSON.parse(text); |
| 651 | } |
| 652 | |
| 653 | /** |
| 654 | * Output a file, creating any necessary directories. |
nothing calls this directly
no test coverage detected