qs 2.4.1 → 2.4.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 +12 -7
- package/lib/parse.js +1 -5
- package/package.json +1 -1
- package/test/parse.js +1 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
|
|
2
|
-
## [**2.
|
|
3
|
-
- [**#
|
|
2
|
+
## [**2.4.1**](https://github.com/hapijs/qs/issues?milestone=20&state=closed)
|
|
3
|
+
- [**#73**](https://github.com/hapijs/qs/issues/73) Property 'hasOwnProperty' of object #<Object> is not a function
|
|
4
|
+
|
|
5
|
+
## [**2.4.0**](https://github.com/hapijs/qs/issues?milestone=19&state=closed)
|
|
6
|
+
- [**#70**](https://github.com/hapijs/qs/issues/70) Add arrayFormat option
|
|
7
|
+
|
|
8
|
+
## [**2.3.3**](https://github.com/hapijs/qs/issues?milestone=18&state=closed)
|
|
9
|
+
- [**#59**](https://github.com/hapijs/qs/issues/59) make sure array indexes are >= 0, closes #57
|
|
4
10
|
- [**#58**](https://github.com/hapijs/qs/issues/58) make qs usable for browser loader
|
|
5
11
|
|
|
6
12
|
## [**2.3.2**](https://github.com/hapijs/qs/issues?milestone=17&state=closed)
|
|
7
13
|
- [**#55**](https://github.com/hapijs/qs/issues/55) allow merging a string into an object
|
|
8
14
|
|
|
9
15
|
## [**2.3.1**](https://github.com/hapijs/qs/issues?milestone=16&state=closed)
|
|
10
|
-
- [**#52**](https://github.com/hapijs/qs/issues/52) Return
|
|
16
|
+
- [**#52**](https://github.com/hapijs/qs/issues/52) Return "undefined" and "false" instead of throwing "TypeError".
|
|
11
17
|
|
|
12
18
|
## [**2.3.0**](https://github.com/hapijs/qs/issues?milestone=15&state=closed)
|
|
13
19
|
- [**#50**](https://github.com/hapijs/qs/issues/50) add option to omit array indices, closes #46
|
|
@@ -34,9 +40,9 @@
|
|
|
34
40
|
- [**#31**](https://github.com/hapijs/qs/issues/31) qs.parse stackoverflow on circular objects
|
|
35
41
|
|
|
36
42
|
## [**2.2.0**](https://github.com/hapijs/qs/issues?milestone=9&state=closed)
|
|
37
|
-
- [**#26**](https://github.com/hapijs/qs/issues/26) Don
|
|
43
|
+
- [**#26**](https://github.com/hapijs/qs/issues/26) Don't use Buffer global if it's not present
|
|
38
44
|
- [**#30**](https://github.com/hapijs/qs/issues/30) Bug when merging non-object values into arrays
|
|
39
|
-
- [**#29**](https://github.com/hapijs/qs/issues/29) Don
|
|
45
|
+
- [**#29**](https://github.com/hapijs/qs/issues/29) Don't call Utils.clone at the top of Utils.merge
|
|
40
46
|
- [**#23**](https://github.com/hapijs/qs/issues/23) Ability to not limit parameters?
|
|
41
47
|
|
|
42
48
|
## [**2.1.0**](https://github.com/hapijs/qs/issues?milestone=8&state=closed)
|
|
@@ -48,7 +54,7 @@
|
|
|
48
54
|
- [**#21**](https://github.com/hapijs/qs/issues/21) make all limits optional, for #18, for #20
|
|
49
55
|
|
|
50
56
|
## [**1.2.2**](https://github.com/hapijs/qs/issues?milestone=6&state=closed)
|
|
51
|
-
- [**#19**](https://github.com/hapijs/qs/issues/19) Don
|
|
57
|
+
- [**#19**](https://github.com/hapijs/qs/issues/19) Don't overwrite null values
|
|
52
58
|
|
|
53
59
|
## [**1.2.1**](https://github.com/hapijs/qs/issues?milestone=5&state=closed)
|
|
54
60
|
- [**#16**](https://github.com/hapijs/qs/issues/16) ignore non-string delimiters
|
|
@@ -65,4 +71,3 @@
|
|
|
65
71
|
|
|
66
72
|
## [**1.0.2**](https://github.com/hapijs/qs/issues?milestone=2&state=closed)
|
|
67
73
|
- [**#5**](https://github.com/hapijs/qs/issues/5) array holes incorrectly copied into object on large index
|
|
68
|
-
|
package/lib/parse.js
CHANGED
|
@@ -29,11 +29,7 @@ internals.parseValues = function (str, options) {
|
|
|
29
29
|
var key = Utils.decode(part.slice(0, pos));
|
|
30
30
|
var val = Utils.decode(part.slice(pos + 1));
|
|
31
31
|
|
|
32
|
-
if (Object.prototype.hasOwnProperty(key)) {
|
|
33
|
-
continue;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
if (!obj.hasOwnProperty(key)) {
|
|
32
|
+
if (!Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
37
33
|
obj[key] = val;
|
|
38
34
|
}
|
|
39
35
|
else {
|
package/package.json
CHANGED
package/test/parse.js
CHANGED
|
@@ -191,6 +191,7 @@ describe('parse()', function () {
|
|
|
191
191
|
expect(typeof obj.toString).to.equal('function');
|
|
192
192
|
expect(typeof obj.bad.toString).to.equal('function');
|
|
193
193
|
expect(typeof obj.constructor).to.equal('function');
|
|
194
|
+
expect(typeof obj.hasOwnProperty).to.equal('function');
|
|
194
195
|
done();
|
|
195
196
|
});
|
|
196
197
|
|