utility to parse params from location.search