qs 2.3.1 → 2.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +5 -2
- package/lib/utils.js +7 -1
- package/package.json +1 -1
- package/test/parse.js +7 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
|
|
2
|
-
## [**2.3.
|
|
2
|
+
## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed)
|
|
3
|
+
- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
|
|
4
|
+
|
|
5
|
+
## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed)
|
|
3
6
|
- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46
|
|
4
7
|
|
|
5
8
|
## [**2.2.5**](https://github.com/hapijs/qs/issues?milestone=14&state=closed)
|
|
6
|
-
- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45
|
|
7
9
|
- [**#39**](https://github.com/hapijs/qs/issues/39) Is there an alternative to Buffer.isBuffer?
|
|
10
|
+
- [**#49**](https://github.com/hapijs/qs/issues/49) refactor utils.merge, fixes #45
|
|
8
11
|
- [**#41**](https://github.com/hapijs/qs/issues/41) avoid browserifying Buffer, for #39
|
|
9
12
|
|
|
10
13
|
## [**2.2.4**](https://github.com/hapijs/qs/issues?milestone=13&state=closed)
|
package/lib/utils.js
CHANGED
package/package.json
CHANGED
package/test/parse.js
CHANGED
|
@@ -158,6 +158,12 @@ describe('parse()', function () {
|
|
|
158
158
|
done();
|
|
159
159
|
});
|
|
160
160
|
|
|
161
|
+
it('can add keys to objects', function (done) {
|
|
162
|
+
|
|
163
|
+
expect(Qs.parse('a[b]=c&a=d')).to.deep.equal({ a: { b: 'c', d: true } });
|
|
164
|
+
done();
|
|
165
|
+
});
|
|
166
|
+
|
|
161
167
|
it('correctly prunes undefined values when converting an array to an object', function (done) {
|
|
162
168
|
|
|
163
169
|
expect(Qs.parse('a[2]=b&a[99999999]=c')).to.deep.equal({ a: { '2': 'b', '99999999': 'c' } });
|
|
@@ -378,7 +384,7 @@ describe('parse()', function () {
|
|
|
378
384
|
|
|
379
385
|
var a = Object.create(null);
|
|
380
386
|
a.b = 'c';
|
|
381
|
-
|
|
387
|
+
|
|
382
388
|
expect(Qs.parse(a)).to.deep.equal({ b: 'c' });
|
|
383
389
|
expect(Qs.parse({ a: a })).to.deep.equal({ a: { b: 'c' } });
|
|
384
390
|
done();
|