@akadenia/helpers
Version:
Akadenia helpers
11 lines (10 loc) • 428 B
TypeScript
/**
* Check if a file path has a valid extension
* @param filePath The file path to check
* @param validExtensions The valid extensions
* @returns true if the file path has a valid extension
* @example
* checkFileExtension("test.geojson", ["geojson", "json"]) // true
* checkFileExtension("test.txt", ["md"]) // false
*/
export declare const checkFileExtension: (filePath: string, validExtensions: string[]) => boolean;