export const getNestedProperty = ( obj , accessor , defaultValue ? ) => { const value = accessor . split ( '.' ) . reduce ( ( o , i ) => o ?. [ i ] , obj ) ; if ( value === undefined ) return defaultValue ; return value ; } ;