Comparing version 2.4.0 to 2.4.1
@@ -32,2 +32,6 @@ // Load modules | ||
if (Object.prototype.hasOwnProperty(key)) { | ||
continue; | ||
} | ||
if (!obj.hasOwnProperty(key)) { | ||
@@ -34,0 +38,0 @@ obj[key] = val; |
{ | ||
"name": "qs", | ||
"version": "2.4.0", | ||
"version": "2.4.1", | ||
"description": "A querystring parser that supports nesting and arrays, with a depth limit", | ||
@@ -5,0 +5,0 @@ "homepage": "https://github.com/hapijs/qs", |
@@ -203,2 +203,13 @@ # qs | ||
You may use the `arrayFormat` option to specify the format of the output array | ||
```javascript | ||
Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'indices' }) | ||
// 'a[0]=b&a[1]=c' | ||
Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'brackets' }) | ||
// 'a[]=b&a[]=c' | ||
Qs.stringify({ a: ['b', 'c'] }, { arrayFormat: 'repeat' }) | ||
// 'a=b&a=c' | ||
``` | ||
Empty strings and null values will omit the value, but the equals sign (=) remains in place: | ||
@@ -205,0 +216,0 @@ |
@@ -190,3 +190,3 @@ /* eslint no-extend-native:0 */ | ||
var obj = Qs.parse('toString=bad&bad[toString]=bad&constructor=bad'); | ||
var obj = Qs.parse('hasOwnProperty=bad&toString=bad&bad[toString]=bad&constructor=bad'); | ||
expect(typeof obj.toString).to.equal('function'); | ||
@@ -193,0 +193,0 @@ expect(typeof obj.bad.toString).to.equal('function'); |
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
41550
739
234