code: function str2obj(str) {
    if (!str) {
      return {};
    }
  
    return str.split('&').reduce(function (acc, cur) {
      var _cur$split = cur.split('='),
          _cur$split2 = _slicedToArray(_cur$split, 2),
          k = _cur$split2[0],
          v = _cur$split2[1];
  
      k = decodeURIComponent(k);
      v = decodeURIComponent(v);
      return _extends({}, acc, _defineProperty({}, k, v));
    }, {});
  }
docs: Deserialize a query string to an clean object:
  
  str2obj('a=1&b=2') => { a: 1, b: 2 }
  
  @param {string} str
  @returns {object}