import type { ViewStyle } from 'react-native'; export const normalizeBorderRadiuses = ({ borderTopLeftRadius, borderTopRightRadius, borderBottomLeftRadius, borderBottomRightRadius, borderRadius, }: ViewStyle) => { const borderRadiuses: Record = { borderTopLeftRadius, borderTopRightRadius, borderBottomLeftRadius, borderBottomRightRadius, borderRadius, }; return Object.keys(borderRadiuses).reduce((acc: Record, key) => { if (borderRadiuses[key] !== undefined && borderRadiuses[key] !== null) { acc[key] = borderRadiuses[key]; } return acc; }, {}); };