Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parser discards first empty value in array #37

Closed
t-yamo opened this issue Sep 5, 2014 · 0 comments

Comments

Projects
None yet
2 participants
@t-yamo
Copy link

commented Sep 5, 2014

Hi, I use this awesome library. But there is one wonder point.

var qs = require("qs");
console.dir(qs.parse("x[]=")); // case1
console.dir(qs.parse("a[]=&a[]=b&a[]=c")); // case2
console.dir(qs.parse("a[]=b&a[]=&a[]=c")); // case3
console.dir(qs.parse("a[]=b&a[]=c&a[]=")); // case4
{ x: [ '' ] }
{ a: [ 'b', 'c' ] }
{ a: [ 'b', '', 'c' ] }
{ a: [ 'b', 'c', '' ] }

Is case2 expected value?

@nlf nlf added the bug label Sep 5, 2014

@nlf nlf added this to the 2.2.3 milestone Sep 5, 2014

@nlf nlf self-assigned this Sep 5, 2014

@nlf nlf closed this in 9c339b3 Sep 5, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.