diff options
author | isaacs <i@izs.me> | 2010-04-11 13:46:24 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-04-11 14:48:23 -0700 |
commit | 57fbb627cadb356bc335274d203c21c71d022b5d (patch) | |
tree | deab95480636a8ddd57573ff95ff21429e18aee3 /lib/querystring.js | |
parent | 93913dbdb8f621bef46c61d1f8a824a19a57dfa5 (diff) | |
download | nodejs-57fbb627cadb356bc335274d203c21c71d022b5d.tar.gz nodejs-57fbb627cadb356bc335274d203c21c71d022b5d.tar.bz2 nodejs-57fbb627cadb356bc335274d203c21c71d022b5d.zip |
trailing whitespace fixes
Diffstat (limited to 'lib/querystring.js')
-rw-r--r-- | lib/querystring.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/querystring.js b/lib/querystring.js index ef50cafa4..5220b53ae 100644 --- a/lib/querystring.js +++ b/lib/querystring.js @@ -30,7 +30,7 @@ QueryString.stringify = function (obj, sep, eq, name) { if (isA(obj, null) || isA(obj, undefined) || typeof(obj) === 'function') { return name ? encodeURIComponent(name) + eq : ''; } - + if (isBool(obj)) obj = +obj; if (isNumber(obj) || isString(obj)) { return encodeURIComponent(name) + eq + encodeURIComponent(obj); @@ -44,14 +44,14 @@ QueryString.stringify = function (obj, sep, eq, name) { return s.join(sep); } // now we know it's an object. - + // Check for cyclical references in nested objects for (var i = stack.length - 1; i >= 0; --i) if (stack[i] === obj) { throw new Error("querystring.stringify. Cyclical reference"); } - + stack.push(obj); - + var s = []; var begin = name ? name + '[' : ''; var end = name ? ']' : ''; @@ -59,9 +59,9 @@ QueryString.stringify = function (obj, sep, eq, name) { var n = begin + i + end; s.push(QueryString.stringify(obj[i], sep, eq, n)); } - + stack.pop(); - + s = s.join(sep); if (!s && name) return name + "="; return s; @@ -112,10 +112,10 @@ var pieceParser = function (eq) { } // ["foo[][bar][][baz]", "foo[][bar][]", "baz"] var tail = sliced[2], head = sliced[1]; - + // array: key[]=val if (!tail) return parsePiece(head, [val]); - + // obj: key[subkey]=val var ret = {}; ret[tail] = val; |