refactor: download project file

This commit is contained in:
Carlos Valente
2024-05-10 20:14:56 +02:00
committed by Carlos Valente
parent 6f80de58ca
commit 00f04fb78c
8 changed files with 263 additions and 81 deletions
+1 -3
View File
@@ -20,9 +20,7 @@ export function ensureDirectory(directory: string): void {
* Ensures that a filename ends with .json extension
*/
export function ensureJsonExtension(filename: string): string {
if (!filename) return filename;
return filename.includes('.json') ? filename : `${filename}.json`;
return filename.endsWith('.json') ? filename : `${filename}.json`;
}
/**