(directories: string[])
| 36 | } |
| 37 | |
| 38 | export function formatDirectoryList(directories: string[]): string { |
| 39 | const dirCount = directories.length |
| 40 | |
| 41 | if (dirCount <= MAX_DIRS_TO_LIST) { |
| 42 | return directories.map(dir => `'${dir}'`).join(', ') |
| 43 | } |
| 44 | |
| 45 | const firstDirs = directories |
| 46 | .slice(0, MAX_DIRS_TO_LIST) |
| 47 | .map(dir => `'${dir}'`) |
| 48 | .join(', ') |
| 49 | |
| 50 | return `${firstDirs}, and ${dirCount - MAX_DIRS_TO_LIST} more` |
| 51 | } |
| 52 | |
| 53 | /** |
| 54 | * Extracts the base directory from a glob pattern for validation. |
nothing calls this directly
no outgoing calls
no test coverage detected