import { MEMBER_FLAGS , isComplexType } from '@utils' ; import { BUILD } from '@app-data' ; export const parsePropertyValue = ( propValue , propType ) => { if ( propValue != null && ! isComplexType ( propValue ) ) { if ( BUILD . propBoolean && propType & MEMBER_FLAGS . Boolean ) { return propValue === 'false' ? false : propValue === '' || ! ! propValue ; } if ( BUILD . propNumber && propType & MEMBER_FLAGS . Number ) { return parseFloat ( propValue ) ; } if ( BUILD . propString && propType & MEMBER_FLAGS . String ) { return String ( propValue ) ; } return propValue ; } return propValue ; } ;