Converts a DirectoryNode to a set of all unique file extensions
The directory structure to analyze
Set of file extensions (including the dot, e.g., '.ts', '.js') Files without extensions are represented as 'none'
const structure = getDirectoryStructure('/path/to/project');const fileTypes = convertDirectoryNodeToTypeSet(structure);console.log(fileTypes); // Set { '.ts', '.js', '.json', '.md', 'none' } Copy
const structure = getDirectoryStructure('/path/to/project');const fileTypes = convertDirectoryNodeToTypeSet(structure);console.log(fileTypes); // Set { '.ts', '.js', '.json', '.md', 'none' }
Converts a DirectoryNode to a set of all unique file extensions