(path: string)
| 8 | * @param path - The absolute path to check if empty. |
| 9 | */ |
| 10 | export async function isDirEmpty(path: string) { |
| 11 | try { |
| 12 | const entries = await readdir(path) |
| 13 | return entries.length === 0 |
| 14 | } catch (error) { |
| 15 | return true |
| 16 | } |
| 17 | } |
| 18 | |
| 19 | export async function readPackageJSON(dir: string) { |
| 20 | const packageJsonPath = resolve(dir, `./package.json`) |
no outgoing calls
no test coverage detected