activities.js
function parseQueryString(query) {
  if (!query) {
    return {};
  }
  return (/^[?#]/.test(query) ? query.slice(1) : query)
      .split('&')
      .reduce((params, param) => {
        const item = param.split('=');
        const key = decodeURIComponent(item[0] || '');
        const value = decodeURIComponent(item[1] || '');
        if (key) {
          params[key] = value;
        }
        return params;
      }, {});
}
function parseQueryString(query) {
  if (!query) {
    return {};
  }
  return (/^[?#]/.test(query) ? query.slice(1) : query)
      .split('&')
      .reduce((params, param) => {
        const item = param.split('=');
        const key = decodeURIComponent(item[0] || '');
        const value = decodeURIComponent(item[1] || '');
        if (key) {
          params[key] = value;
        }
        return params;
      }, {});
}
function parseQueryString ( query ) { if ( ! query ) { return { } ; } return ( / ^[?#] / . test ( query ) ? query . slice ( 1 ) : query ) . split ( '&' ) . reduce ( ( params , param ) => { const item = param . split ( '=' ) ; const key = decodeURIComponent ( item [ 0 ] || '' ) ; const value = decodeURIComponent ( item [ 1 ] || '' ) ; if ( key ) { params [ key ] = value ; } return params ; } , { } ) ; }
Parses and builds Object of URL query string.
@param {string} query The URL query string.
@return {!Object<string, string>}
Parses and builds Object of URL query string .