Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

qs

Package Overview
Dependencies
Maintainers
2
Versions
113
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

qs - npm Package Compare versions

Comparing version 2.4.0 to 2.4.1

4

lib/parse.js

@@ -32,2 +32,6 @@ // Load modules

if (Object.prototype.hasOwnProperty(key)) {
continue;
}
if (!obj.hasOwnProperty(key)) {

@@ -34,0 +38,0 @@ obj[key] = val;

2

package.json
{
"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');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc