Comparing version 2.3.1 to 2.3.2
## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=open) | ||
## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed) | ||
- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError". | ||
## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed) | ||
- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46 | ||
## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed) | ||
- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer? | ||
- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45 | ||
- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer? | ||
- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39 | ||
@@ -9,0 +12,0 @@ |
@@ -30,3 +30,9 @@ // Load modules | ||
if (typeof source !== 'object') { | ||
target.push(source); | ||
if (Array.isArray(target)) { | ||
target.push(source); | ||
} | ||
else { | ||
target[source] = true; | ||
} | ||
return target; | ||
@@ -33,0 +39,0 @@ } |
{ | ||
"name": "qs", | ||
"version": "2.3.1", | ||
"version": "2.3.2", | ||
"description": "A querystring parser that supports nesting and arrays, with a depth limit", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/hapijs/qs", |
@@ -161,2 +161,8 @@ // Load modules | ||
it('can add keys to objects', function (done) { | ||
expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } }); | ||
done(); | ||
}); | ||
it('correctly prunes undefined values when converting an array to an object', function (done) { | ||
@@ -382,3 +388,3 @@ | ||
a.b = 'c'; | ||
expect(Qs.parse(a)).to.deep.equal({ b: 'c' }); | ||
@@ -385,0 +391,0 @@ expect(Qs.parse({ a: a })).to.deep.equal({ a: { b: 'c' } }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
38466
687