code: function serializeQuery(paramsObj) {
      var k, params = [];
      for (k in paramsObj) {
        if (paramsObj.hasOwnProperty(k) && paramsObj[k] !== undefined) {
          params.push(encodeURIComponent(k) + "=" + encodeURIComponent(paramsObj[k]));
        }
      }
      return params.join("&");
    }
docs: Serialize a map of properties (as a JavaScript object) to a query string