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

qs

Package Overview
Dependencies
Maintainers
0
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 0.0.7 to 0.1.0

6

examples.js

@@ -34,1 +34,7 @@

require('inspect')(obj)
var obj = qs.parse('user[names]=tj&user[names]=TJ&user[names]=Tyler');
require('inspect')(obj)
var obj = qs.parse('user[name][first]=tj&user[name][first]=TJ');
require('inspect')(obj)
0.1.0 / 2011-04-13
==================
* Added jQuery-ish array support
0.0.7 / 2011-03-13

@@ -6,2 +11,3 @@ ==================

* Fixed; handle empty string and `== null` in `qs.parse()` [dmit]
allows for convenient `qs.parse(url.parse(str).query)`

@@ -8,0 +14,0 @@ 0.0.6 / 2011-02-14

10

lib/querystring.js

@@ -12,3 +12,3 @@

exports.version = '0.0.7';
exports.version = '0.1.0';

@@ -51,3 +51,9 @@ /**

if (!part) {
parent[key] = val;
if (Array.isArray(parent[key])) {
parent[key].push(val);
} else if ('object' == typeof parent[key]) {
parent[key] = val;
} else {
parent[key] = [parent[key], val];
}
// array

@@ -54,0 +60,0 @@ } else if (']' == part) {

2

package.json
{
"name": "qs",
"description": "querystring parser",
"version": "0.0.7",
"version": "0.1.0",
"repository": {},

@@ -6,0 +6,0 @@ "author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",

@@ -86,2 +86,11 @@

.should.eql({ user: { names: ['tj', 'tyler'], email: 'tj@vision-media.ca' }});
qs.parse('items=a&items=b')
.should.eql({ items: ['a', 'b'] });
qs.parse('user[names]=tj&user[names]=holowaychuk&user[names]=TJ')
.should.eql({ user: { names: ['tj', 'holowaychuk', 'TJ'] }});
qs.parse('user[name][first]=tj&user[name][first]=TJ')
.should.eql({ user: { name: { first: ['tj', 'TJ'] }}});
},

@@ -88,0 +97,0 @@

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