export const asBool = ( value , defaultValue ) : boolean => { if ( value === undefined ) { return defaultValue ; } return value === 'true' || value === true ; } ; export const asNumber = ( value , defaultValue ) : number => { if ( value === undefined ) { return defaultValue ; } return parseFloat ( value ) ; } ;