export const toTitleCaseWithSpaces = (input: string): string => { return input .replace(/[-_]/g, " ") .split(" ") .filter(Boolean) .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) .join(" "); }; export const parseImageName = (fileName: string): string => { // Extract the name without the extension return fileName.split(".").slice(0, -1).join("."); };