qs 0.6.4 → 0.6.5

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.
Files changed (2) hide show
  1. package/index.js +12 -2
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -81,7 +81,11 @@ var isint = /^[0-9]+$/;
81
81
  function promote(parent, key) {
82
82
  if (parent[key].length == 0) return parent[key] = createObject();
83
83
  var t = createObject();
84
- for (var i in parent[key]) t[i] = parent[key][i];
84
+ for (var i in parent[key]) {
85
+ if (hasOwnProperty.call(parent[key], i)) {
86
+ t[i] = parent[key][i];
87
+ }
88
+ }
85
89
  parent[key] = t;
86
90
  return t;
87
91
  }
@@ -155,7 +159,13 @@ function compact(obj) {
155
159
 
156
160
  if (isArray(obj)) {
157
161
  var ret = [];
158
- for (var i in obj) ret.push(obj[i]);
162
+
163
+ for (var i in obj) {
164
+ if (hasOwnProperty.call(obj, i)) {
165
+ ret.push(obj[i]);
166
+ }
167
+ }
168
+
159
169
  return ret;
160
170
  }
161
171
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "qs",
3
3
  "description": "querystring parser",
4
- "version": "0.6.4",
4
+ "version": "0.6.5",
5
5
  "keywords": ["query string", "parser", "component"],
6
6
  "repository": {
7
7
  "type" : "git",