qs 6.9.7 → 6.10.3
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 +22 -5
- package/README.md +7 -0
- package/dist/qs.js +1207 -5
- package/lib/parse.js +6 -0
- package/lib/stringify.js +33 -3
- package/package.json +4 -1
- package/test/parse.js +9 -0
- package/test/stringify.js +62 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,14 +1,31 @@
|
|
|
1
|
-
## **6.
|
|
1
|
+
## **6.10.3**
|
|
2
2
|
- [Fix] `parse`: ignore `__proto__` keys (#428)
|
|
3
|
-
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
|
|
4
3
|
- [Robustness] `stringify`: avoid relying on a global `undefined` (#427)
|
|
4
|
+
- [actions] reuse common workflows
|
|
5
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `object-inspect`, `tape`
|
|
6
|
+
|
|
7
|
+
## **6.10.2**
|
|
8
|
+
- [Fix] `stringify`: actually fix cyclic references (#426)
|
|
9
|
+
- [Fix] `stringify`: avoid encoding arrayformat comma when `encodeValuesOnly = true` (#424)
|
|
5
10
|
- [readme] remove travis badge; add github actions/codecov badges; update URLs
|
|
6
11
|
- [Docs] add note and links for coercing primitive values (#408)
|
|
12
|
+
- [actions] update codecov uploader
|
|
13
|
+
- [actions] update workflows
|
|
7
14
|
- [Tests] clean up stringify tests slightly
|
|
15
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `object-inspect`, `safe-publish-latest`, `tape`
|
|
16
|
+
|
|
17
|
+
## **6.10.1**
|
|
18
|
+
- [Fix] `stringify`: avoid exception on repeated object values (#402)
|
|
19
|
+
|
|
20
|
+
## **6.10.0**
|
|
21
|
+
- [New] `stringify`: throw on cycles, instead of an infinite loop (#395, #394, #393)
|
|
22
|
+
- [New] `parse`: add `allowSparse` option for collapsing arrays with missing indices (#312)
|
|
8
23
|
- [meta] fix README.md (#399)
|
|
9
|
-
-
|
|
10
|
-
- [
|
|
11
|
-
- [
|
|
24
|
+
- [meta] only run `npm run dist` in publish, not install
|
|
25
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `has-symbols`, `tape`
|
|
26
|
+
- [Tests] fix tests on node v0.6
|
|
27
|
+
- [Tests] use `ljharb/actions/node/install` instead of `ljharb/actions/node/run`
|
|
28
|
+
- [Tests] Revert "[meta] ignore eclint transitive audit warning"
|
|
12
29
|
|
|
13
30
|
## **6.9.6**
|
|
14
31
|
- [Fix] restore `dist` dir; mistakenly removed in d4f6c32
|
package/README.md
CHANGED
|
@@ -228,6 +228,13 @@ var noSparse = qs.parse('a[1]=b&a[15]=c');
|
|
|
228
228
|
assert.deepEqual(noSparse, { a: ['b', 'c'] });
|
|
229
229
|
```
|
|
230
230
|
|
|
231
|
+
You may also use `allowSparse` option to parse sparse arrays:
|
|
232
|
+
|
|
233
|
+
```javascript
|
|
234
|
+
var sparseArray = qs.parse('a[1]=2&a[3]=5', { allowSparse: true });
|
|
235
|
+
assert.deepEqual(sparseArray, { a: [, '2', , '5'] });
|
|
236
|
+
```
|
|
237
|
+
|
|
231
238
|
Note that an empty string is also a value, and will be preserved:
|
|
232
239
|
|
|
233
240
|
```javascript
|