2
0
Files
cal/calcom/packages/lib/extract-base-email.ts
2024-08-09 00:39:27 +02:00

7 lines
234 B
TypeScript

// Function to extract base email
export const extractBaseEmail = (email: string): string => {
const [localPart, domain] = email.split("@");
const baseLocalPart = localPart.split("+")[0];
return `${baseLocalPart}@${domain}`;
};