refactor code

This commit is contained in:
Abhinav 2021-11-11 13:13:59 +05:30
parent 6a482c937e
commit f0787b7dfb

View file

@ -97,10 +97,6 @@ export const getUniqueCollectionFolderPath = (
return collectionFolderPath; return collectionFolderPath;
}; };
export const sanitizeName = (name: string) => {
return name.replaceAll('/', '_').replaceAll(' ', '_');
};
export const getUniqueFileSaveName = ( export const getUniqueFileSaveName = (
filename: string, filename: string,
usedFileNamesInCollection: Set<string> usedFileNamesInCollection: Set<string>
@ -115,3 +111,7 @@ export const getUniqueFileSaveName = (
} }
return fileSaveName; return fileSaveName;
}; };
export const sanitizeName = (name: string) => {
return name.replaceAll('/', '_').replaceAll(' ', '_');
};