1 import { normalize } from '../../helpers/string';
2 import type { VcalStringProperty } from '../../interfaces/calendar';
3 import { ICAL_CALSCALE } from '../constants';
5 export const getSupportedStringValue = (property?: VcalStringProperty) => {
6 const trimmedValue = property?.value?.trim();
8 // return undefined for empty strings
14 export const getSupportedCalscale = (calscale?: VcalStringProperty) => {
16 return ICAL_CALSCALE.GREGORIAN;
19 return normalize(calscale.value) === normalize(ICAL_CALSCALE.GREGORIAN) ? ICAL_CALSCALE.GREGORIAN : undefined;