code: function obj2str(obj) {
    return Object.getOwnPropertyNames(obj).map(function (key) {
      return encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]);
    }).join('&');
  }
docs: Serialize an object to query string:
  
  obj2str({ a: 1, b: 2 }) => 'a=1&b=2'
  
  @param {object} obj
  @returns {string}