Gozala/querystring

empty array inconsistencies with Node.js >= 0.11.14

Closed this issue · 1 comments

What happens?

When I stringify an object with an empty array, I get a repeated & in the query string output.

querystring.stringify({null: null, undefined: undefined, emptyString: '', emptyArray: [], emptyObject: {}});
// 'null=&undefined=&emptyString=&&emptyObject='

What did you expect to happen?

I expected there to not be an extra & in the query string output since it has been patched in Node.js (nodejs/node-v0.x-archive@61ddad1, see nodejs/node-v0.x-archive#7971). Note that in Node.js 0.10, the behavior is consistent.

Thank you for your work and your time, cheers!

Should be addressed with new versions as explained at #20 (PR's are welcome)