function serialize (params) {
    var str = [], key, value;
    for (var p in params) {
        if (params.hasOwnProperty(p) && params[p]) {
            key = encodeURIComponent(p);
            value = encodeURIComponent(params[p]);
            str.push(key + '=' + value);
        }
    }
    return str.join('&');
}

@@ -1,83 +1,632 @@
-function serialize (params) %7B%0A    var str = %5B%5D, key, value;%0A    for (var p in p
+/**%0A * Serialize's an object into query params for a URL%0A * Passes & between params (? or & not prefixed)%0A * @param  %7Bobject%7D queryParams The different params to searlize (key becomes &param value becomes =value)%0A * @return %7Bstring%7D        Passes back a serialized version from the object ready to be used for a URL%0A *%0A * @example%0A *  var queryParams = %7B%0A *  %09%09'first_name': 'Bart',%0A *  %09%09'last_name': 'Simpson'%0A * %09%09%7D;%0A * %09searlize(queryParams);%0A * %09// returns%0A * %09// first_name=Bart&last_name=Simpson%0A */%0Afunction serialize (queryParams) %7B%0A    var str = %5B%5D,%0A        key,%0A        value,%0A        query;%0A%0A    for (query in queryP
 aram
@@ -642,17 +642,22 @@
     if (
-p
+queryP
 arams.ha
@@ -673,22 +673,35 @@
 rty(
-p) && p
+query) && queryP
 arams%5B
-p
+query
 %5D) %7B
@@ -738,17 +738,21 @@
 mponent(
-p
+query
 );%0A     
@@ -789,16 +789,25 @@
 ent(
-p
+queryP
 arams%5B
-p
+query
 %5D);%0A
@@ -857,22 +857,23 @@
       %7D%0A
-
     %7D%0A
+%0A
     retu

Add JSDoc info for serialize