(path)
| 30 | } |
| 31 | |
| 32 | async function getLatestExerciseDirectory(path) { |
| 33 | try { |
| 34 | const files = await readdir(join(process.cwd(), path)); |
| 35 | return files.findLast((file) => /^\d+_\w+$/.test(file)); |
| 36 | } catch { |
| 37 | return "0"; |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | async function createExerciseDirectoryName(exerciseName, path) { |
| 42 | const latestExerciseDirectory = await getLatestExerciseDirectory(path); |
no outgoing calls
no test coverage detected