1 import { extractEmailAddress } from '@proton/shared/lib/calendar/vcalConverter';
2 import type { VcalOrganizerProperty } from '@proton/shared/lib/interfaces/calendar/VcalModel';
4 export const propertiesToOrganizerModel = (organizer?: VcalOrganizerProperty) => {
8 const email = extractEmailAddress(organizer);
9 if (email === undefined) {
10 throw new Error('Malformed organizer');
12 const { cn = '' } = organizer?.parameters || {};