(directories: string[])
| 803 | } |
| 804 | |
| 805 | function formatDirectoryList(directories: string[]): string { |
| 806 | const dirCount = directories.length |
| 807 | if (dirCount <= MAX_DIRS_TO_LIST) { |
| 808 | return directories.map(dir => `'${dir}'`).join(', ') |
| 809 | } |
| 810 | const firstDirs = directories |
| 811 | .slice(0, MAX_DIRS_TO_LIST) |
| 812 | .map(dir => `'${dir}'`) |
| 813 | .join(', ') |
| 814 | return `${firstDirs}, and ${dirCount - MAX_DIRS_TO_LIST} more` |
| 815 | } |
| 816 | |
| 817 | /** |
| 818 | * Expands tilde (~) at the start of a path to the user's home directory. |
no outgoing calls
no test coverage detected