Comparing version 0.0.6 to 0.0.7
0.0.7 / 2011-03-13 | ||
================== | ||
* Fixed; handle empty string and `== null` in `qs.parse()` [dmit] | ||
0.0.6 / 2011-02-14 | ||
@@ -3,0 +8,0 @@ ================== |
@@ -12,3 +12,3 @@ | ||
exports.version = '0.0.6'; | ||
exports.version = '0.0.7'; | ||
@@ -24,2 +24,4 @@ /** | ||
exports.parse = function(str) { | ||
if (str == undefined || str == '') return {}; | ||
return String(str) | ||
@@ -117,2 +119,2 @@ .split('&') | ||
} | ||
} | ||
} |
{ | ||
"name": "qs", | ||
"description": "querystring parser", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"repository": {}, | ||
@@ -6,0 +6,0 @@ "author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)", |
@@ -11,2 +11,4 @@ | ||
'test basics': function(){ | ||
qs.parse('0=foo').should.eql({ '0': 'foo' }); | ||
qs.parse('foo=c++') | ||
@@ -104,2 +106,8 @@ .should.eql({ foo: 'c ' }); | ||
.should.eql({ items: ['bar', 'baz', 'raz'] }); | ||
}, | ||
'test empty': function(){ | ||
qs.parse('').should.eql({}); | ||
qs.parse(undefined).should.eql({}); | ||
qs.parse(null).should.eql({}); | ||
} | ||
@@ -118,2 +126,2 @@ | ||
// } | ||
}; | ||
}; |
172699
41
1415