export const objToUrlParams = ( obj ) : string => Object . keys ( obj ) . reduce ( ( acc , k ) : string [ ] => obj [ k ] != null ? [ ... acc , `${ k }=${ encodeURIComponent ( obj [ k ] ) }` ] : acc , [ ] ) . join ( "&" ) ;