import type { ProfileType } from '../types/sdkTypes'; export const normalizeProfile = (profile: ProfileType[] | undefined) => { if (!profile) return []; return profile.filter(({ value, category }) => { if (value && category) return true; console.warn( `value and category are required for profile fields but value is ${value}, category is ${category}` ); return false; }); // TODO: Add more validation for profile fields like in the web SDK };