export function getQueryParams ( search = location . search ) { const params = { } ; search . split ( '&' ) . forEach ( ( param ) => { const [ name , value ] = param . split ( '=' ) ; params [ decodeURIComponent ( name ) ] = value ? decodeURIComponent ( value ) : true ; } ) ; return params ; }