@nocobase/plugin-multi-keyword-filter 2.2.17 → 2.2.19

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 (46) hide show
  1. package/dist/client/103.b39ee70786cb13a7.js +10 -0
  2. package/dist/client/index.js +1 -1
  3. package/dist/client-v2/103.dfed67c95bcd8a1d.js +10 -0
  4. package/dist/client-v2/index.js +1 -1
  5. package/dist/externalVersion.js +4 -4
  6. package/dist/node_modules/qs/.editorconfig +4 -1
  7. package/dist/node_modules/qs/.github/SECURITY.md +11 -0
  8. package/dist/node_modules/qs/.github/THREAT_MODEL.md +78 -0
  9. package/dist/node_modules/qs/dist/qs.js +90 -2036
  10. package/dist/node_modules/qs/lib/index.js +1 -1
  11. package/dist/node_modules/qs/lib/parse.js +215 -66
  12. package/dist/node_modules/qs/lib/stringify.js +90 -32
  13. package/dist/node_modules/qs/lib/utils.js +189 -53
  14. package/dist/node_modules/qs/node_modules/es-define-property/.eslintrc +13 -0
  15. package/dist/node_modules/qs/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  16. package/dist/node_modules/qs/node_modules/es-define-property/.nycrc +9 -0
  17. package/dist/node_modules/qs/node_modules/es-define-property/index.d.ts +3 -0
  18. package/dist/node_modules/qs/node_modules/es-define-property/index.js +14 -0
  19. package/dist/node_modules/qs/node_modules/es-define-property/package.json +81 -0
  20. package/dist/node_modules/qs/node_modules/es-define-property/test/index.js +56 -0
  21. package/dist/node_modules/qs/node_modules/side-channel/.editorconfig +9 -0
  22. package/dist/node_modules/qs/node_modules/side-channel/.eslintrc +12 -0
  23. package/dist/node_modules/qs/node_modules/side-channel/.github/FUNDING.yml +12 -0
  24. package/dist/node_modules/qs/node_modules/side-channel/.nycrc +13 -0
  25. package/dist/node_modules/qs/node_modules/side-channel/index.d.ts +14 -0
  26. package/dist/node_modules/qs/node_modules/side-channel/index.js +46 -0
  27. package/dist/node_modules/qs/node_modules/side-channel/package.json +85 -0
  28. package/dist/node_modules/qs/node_modules/side-channel/test/index.js +120 -0
  29. package/dist/node_modules/qs/node_modules/side-channel-list/.editorconfig +9 -0
  30. package/dist/node_modules/qs/node_modules/side-channel-list/.eslintrc +11 -0
  31. package/dist/node_modules/qs/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  32. package/dist/node_modules/qs/node_modules/side-channel-list/.nycrc +13 -0
  33. package/dist/node_modules/qs/node_modules/side-channel-list/index.d.ts +13 -0
  34. package/dist/node_modules/qs/node_modules/side-channel-list/index.js +111 -0
  35. package/dist/node_modules/qs/node_modules/side-channel-list/list.d.ts +14 -0
  36. package/dist/node_modules/qs/node_modules/side-channel-list/package.json +77 -0
  37. package/dist/node_modules/qs/node_modules/side-channel-list/test/index.js +154 -0
  38. package/dist/node_modules/qs/package.json +1 -1
  39. package/dist/node_modules/qs/test/empty-keys-cases.js +261 -31
  40. package/dist/node_modules/qs/test/parse.js +1281 -57
  41. package/dist/node_modules/qs/test/stringify.js +851 -58
  42. package/dist/node_modules/qs/test/utils.js +505 -3
  43. package/package.json +5 -2
  44. package/dist/client/103.513149b773e262dc.js +0 -10
  45. package/dist/client-v2/103.8bcbf628d0af8457.js +0 -10
  46. package/dist/node_modules/qs/.eslintrc +0 -38
@@ -0,0 +1,77 @@
1
+ {
2
+ "name": "side-channel-list",
3
+ "version": "1.0.1",
4
+ "description": "Store information about any JS value in a side channel, using a linked list",
5
+ "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./package.json": "./package.json"
9
+ },
10
+ "types": "./index.d.ts",
11
+ "scripts": {
12
+ "prepack": "npmignore --auto --commentLines=autogenerated",
13
+ "prepublishOnly": "safe-publish-latest",
14
+ "prepublish": "not-in-publish || npm run prepublishOnly",
15
+ "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
16
+ "lint": "eslint --ext=js,mjs .",
17
+ "postlint": "tsc -p . && attw -P",
18
+ "pretest": "npm run lint",
19
+ "tests-only": "nyc tape 'test/**/*.js'",
20
+ "test": "npm run tests-only",
21
+ "posttest": "npx npm@'>= 10.2' audit --production",
22
+ "version": "auto-changelog && git add CHANGELOG.md",
23
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
24
+ },
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "git+https://github.com/ljharb/side-channel-list.git"
28
+ },
29
+ "keywords": [],
30
+ "author": "Jordan Harband <ljharb@gmail.com>",
31
+ "funding": {
32
+ "url": "https://github.com/sponsors/ljharb"
33
+ },
34
+ "license": "MIT",
35
+ "bugs": {
36
+ "url": "https://github.com/ljharb/side-channel-list/issues"
37
+ },
38
+ "homepage": "https://github.com/ljharb/side-channel-list#readme",
39
+ "dependencies": {
40
+ "es-errors": "^1.3.0",
41
+ "object-inspect": "^1.13.4"
42
+ },
43
+ "devDependencies": {
44
+ "@arethetypeswrong/cli": "^0.18.2",
45
+ "@ljharb/eslint-config": "^22.2.2",
46
+ "@ljharb/tsconfig": "^0.3.2",
47
+ "@types/object-inspect": "^1.13.0",
48
+ "@types/tape": "^5.8.1",
49
+ "auto-changelog": "^2.5.0",
50
+ "eclint": "^2.8.1",
51
+ "encoding": "^0.1.13",
52
+ "eslint": "^8.57.1",
53
+ "evalmd": "^0.0.19",
54
+ "in-publish": "^2.0.1",
55
+ "npmignore": "^0.3.5",
56
+ "nyc": "^10.3.2",
57
+ "safe-publish-latest": "^2.0.0",
58
+ "tape": "^5.9.0",
59
+ "typescript": "next"
60
+ },
61
+ "auto-changelog": {
62
+ "output": "CHANGELOG.md",
63
+ "template": "keepachangelog",
64
+ "unreleased": false,
65
+ "commitLimit": false,
66
+ "backfillLimit": false,
67
+ "hideCredit": true
68
+ },
69
+ "publishConfig": {
70
+ "ignore": [
71
+ ".github/workflows"
72
+ ]
73
+ },
74
+ "engines": {
75
+ "node": ">= 0.4"
76
+ }
77
+ }
@@ -0,0 +1,154 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+
5
+ var getSideChannelList = require('../');
6
+
7
+ test('getSideChannelList', function (t) {
8
+ t.test('export', function (st) {
9
+ st.equal(typeof getSideChannelList, 'function', 'is a function');
10
+
11
+ st.equal(getSideChannelList.length, 0, 'takes no arguments');
12
+
13
+ var channel = getSideChannelList();
14
+ st.ok(channel, 'is truthy');
15
+ st.equal(typeof channel, 'object', 'is an object');
16
+ st.end();
17
+ });
18
+
19
+ t.test('assert', function (st) {
20
+ var channel = getSideChannelList();
21
+ st['throws'](
22
+ function () { channel.assert({}); },
23
+ TypeError,
24
+ 'nonexistent value throws'
25
+ );
26
+
27
+ var o = {};
28
+ channel.set(o, 'data');
29
+ st.doesNotThrow(function () { channel.assert(o); }, 'existent value noops');
30
+
31
+ st.end();
32
+ });
33
+
34
+ t.test('has', function (st) {
35
+ var channel = getSideChannelList();
36
+ /** @type {unknown[]} */ var o = [];
37
+
38
+ st.equal(channel.has(o), false, 'nonexistent value yields false');
39
+
40
+ channel.set(o, 'foo');
41
+ st.equal(channel.has(o), true, 'existent value yields true');
42
+
43
+ st.equal(channel.has('abc'), false, 'non object value non existent yields false');
44
+
45
+ channel.set('abc', 'foo');
46
+ st.equal(channel.has('abc'), true, 'non object value that exists yields true');
47
+
48
+ st.end();
49
+ });
50
+
51
+ t.test('get', function (st) {
52
+ var channel = getSideChannelList();
53
+ var o = {};
54
+ st.equal(channel.get(o), undefined, 'nonexistent value yields undefined');
55
+
56
+ var data = {};
57
+ channel.set(o, data);
58
+ st.equal(channel.get(o), data, '"get" yields data set by "set"');
59
+
60
+ st.end();
61
+ });
62
+
63
+ t.test('set', function (st) {
64
+ var channel = getSideChannelList();
65
+ var o = function () {};
66
+ st.equal(channel.get(o), undefined, 'value not set');
67
+
68
+ channel.set(o, 42);
69
+ st.equal(channel.get(o), 42, 'value was set');
70
+
71
+ channel.set(o, Infinity);
72
+ st.equal(channel.get(o), Infinity, 'value was set again');
73
+
74
+ var o2 = {};
75
+ channel.set(o2, 17);
76
+ st.equal(channel.get(o), Infinity, 'o is not modified');
77
+ st.equal(channel.get(o2), 17, 'o2 is set');
78
+
79
+ channel.set(o, 14);
80
+ st.equal(channel.get(o), 14, 'o is modified');
81
+ st.equal(channel.get(o2), 17, 'o2 is not modified');
82
+
83
+ st.end();
84
+ });
85
+
86
+ t.test('delete', function (st) {
87
+ var channel = getSideChannelList();
88
+ var o = {};
89
+ st.equal(channel['delete']({}), false, 'nonexistent value yields false');
90
+
91
+ channel.set(o, 42);
92
+ st.equal(channel.has(o), true, 'value is set');
93
+
94
+ st.equal(channel['delete']({}), false, 'nonexistent value still yields false');
95
+
96
+ st.equal(channel['delete'](o), true, 'deleted value yields true');
97
+
98
+ st.equal(channel.has(o), false, 'value is no longer set');
99
+
100
+ st.end();
101
+ });
102
+
103
+ t.test('delete: first node in a multi-node list', function (st) {
104
+ var channel = getSideChannelList();
105
+
106
+ channel.set('a', 1);
107
+ channel.set('b', 2);
108
+
109
+ st.equal(channel['delete']('b'), true, 'deleting first data node yields true');
110
+
111
+ st.equal(channel.has('a'), true, 'second node is still present after deleting first');
112
+ st.equal(channel.get('a'), 1, 'second node value is intact after deleting first');
113
+ st.equal(channel.has('b'), false, 'deleted node is gone');
114
+
115
+ st.end();
116
+ });
117
+
118
+ t.test('delete: last remaining node empties the list', function (st) {
119
+ var channel = getSideChannelList();
120
+
121
+ channel.set('a', 1);
122
+ channel.set('b', 2);
123
+
124
+ st.equal(channel['delete']('b'), true, 'delete first node');
125
+ st.equal(channel['delete']('a'), true, 'delete second (last) node');
126
+
127
+ st.equal(channel.has('a'), false, 'a is gone');
128
+ st.equal(channel.has('b'), false, 'b is gone');
129
+ st.equal(channel.get('a'), undefined, 'get a yields undefined');
130
+
131
+ channel.set('c', 3);
132
+ st.equal(channel.get('c'), 3, 'can set new values after emptying');
133
+
134
+ st.end();
135
+ });
136
+
137
+ t.test('delete: middle node in a multi-node list', function (st) {
138
+ var channel = getSideChannelList();
139
+
140
+ channel.set('a', 1);
141
+ channel.set('b', 2);
142
+ channel.set('c', 3);
143
+
144
+ st.equal(channel['delete']('b'), true, 'deleting middle node yields true');
145
+
146
+ st.equal(channel.get('a'), 1, 'first node still intact');
147
+ st.equal(channel.has('b'), false, 'middle node is gone');
148
+ st.equal(channel.get('c'), 3, 'last node still intact');
149
+
150
+ st.end();
151
+ });
152
+
153
+ t.end();
154
+ });
@@ -1 +1 @@
1
- {"name":"qs","description":"A querystring parser that supports nesting and arrays, with a depth limit","homepage":"https://github.com/ljharb/qs","version":"6.11.2","repository":{"type":"git","url":"https://github.com/ljharb/qs.git"},"funding":{"url":"https://github.com/sponsors/ljharb"},"main":"lib/index.js","contributors":[{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"}],"keywords":["querystring","qs","query","url","parse","stringify"],"engines":{"node":">=0.6"},"dependencies":{"side-channel":"^1.0.4"},"devDependencies":{"@ljharb/eslint-config":"^21.0.1","aud":"^2.0.2","browserify":"^16.5.2","eclint":"^2.8.1","eslint":"=8.8.0","evalmd":"^0.0.19","for-each":"^0.3.3","has-override-mistake":"^1.0.0","has-property-descriptors":"^1.0.0","has-symbols":"^1.0.3","iconv-lite":"^0.5.1","in-publish":"^2.0.1","mkdirp":"^0.5.5","mock-property":"^1.0.0","npmignore":"^0.3.0","nyc":"^10.3.2","object-inspect":"^1.12.3","qs-iconv":"^1.0.4","safe-publish-latest":"^2.0.0","safer-buffer":"^2.1.2","tape":"^5.6.3"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated","prepublishOnly":"safe-publish-latest && npm run dist","prepublish":"not-in-publish || npm run prepublishOnly","pretest":"npm run --silent readme && npm run --silent lint","test":"npm run tests-only","tests-only":"nyc tape 'test/**/*.js'","posttest":"aud --production","readme":"evalmd README.md","postlint":"eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)","lint":"eslint --ext=js,mjs .","dist":"mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"},"license":"BSD-3-Clause","publishConfig":{"ignore":["!dist/*","bower.json","component.json",".github/workflows"]},"_lastModified":"2026-09-24T00:58:03.350Z"}
1
+ {"name":"qs","description":"A querystring parser that supports nesting and arrays, with a depth limit","homepage":"https://github.com/ljharb/qs","version":"6.16.0","repository":{"type":"git","url":"https://github.com/ljharb/qs.git"},"funding":{"url":"https://github.com/sponsors/ljharb"},"main":"lib/index.js","sideEffects":false,"contributors":[{"name":"Jordan Harband","email":"ljharb@gmail.com","url":"http://ljharb.codes"}],"keywords":["querystring","qs","query","url","parse","stringify"],"engines":{"node":">=0.6"},"dependencies":{"es-define-property":"^1.0.1","side-channel":"^1.1.1"},"devDependencies":{"@browserify/envify":"^6.0.0","@browserify/uglifyify":"^6.0.0","@ljharb/eslint-config":"^22.2.4","browserify":"^16.5.2","bundle-collapser":"^1.4.0","common-shakeify":"~1.0.0","eclint":"^2.8.1","es-value-fixtures":"^1.7.1","eslint":"^10.9.0","evalmd":"^0.0.22","for-each":"^0.3.5","glob":"=10.3.7","has-bigints":"^1.1.0","has-override-mistake":"^1.0.1","has-property-descriptors":"^1.0.2","has-proto":"^1.2.0","has-symbols":"^1.1.0","iconv-lite":"^0.5.2","in-publish":"^2.0.1","jackspeak":"=2.1.1","jiti":"^0.0.0","mkdirp":"^0.5.5","mock-property":"^1.1.2","module-deps":"^6.2.3","npmignore":"^0.3.5","nyc":"^10.3.2","object-inspect":"^1.13.4","qs-iconv":"^1.0.4","safe-publish-latest":"^2.0.0","safer-buffer":"^2.1.2","tape":"^5.10.2","unassertify":"^3.0.1"},"scripts":{"prepack":"npmignore --auto --commentLines=autogenerated && npm run dist","prepublishOnly":"safe-publish-latest","prepublish":"not-in-publish || npm run prepublishOnly","pretest":"npm run --silent readme && npm run --silent lint","test":"npm run tests-only","tests-only":"nyc tape 'test/**/*.js'","posttest":"npx npm@'>=10.2' audit --production","readme":"evalmd README.md","postlint":"eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)","lint":"eslint .","dist":"mkdirp dist && browserify --standalone Qs -g unassertify -g @browserify/envify -g [@browserify/uglifyify --mangle.keep_fnames --compress.keep_fnames --format.indent_level=1 --compress.arrows=false --compress.passes=4 --compress.typeofs=false] -p common-shakeify -p bundle-collapser/plugin lib/index.js > dist/qs.js"},"license":"BSD-3-Clause","publishConfig":{"ignore":["!dist/*","bower.json","component.json",".github/workflows","logos","tea.yaml"]},"_lastModified":"2026-09-29T04:30:55.391Z"}
@@ -2,36 +2,266 @@
2
2
 
3
3
  module.exports = {
4
4
  emptyTestCases: [
5
- { input: '&', withEmptyKeys: {}, stringifyOutput: '', noEmptyKeys: {} },
6
- { input: '&&', withEmptyKeys: {}, stringifyOutput: '', noEmptyKeys: {} },
7
- { input: '&=', withEmptyKeys: { '': '' }, stringifyOutput: '=', noEmptyKeys: {} },
8
- { input: '&=&', withEmptyKeys: { '': '' }, stringifyOutput: '=', noEmptyKeys: {} },
9
- { input: '&=&=', withEmptyKeys: { '': ['', ''] }, stringifyOutput: '[0]=&[1]=', noEmptyKeys: {} },
10
- { input: '&=&=&', withEmptyKeys: { '': ['', ''] }, stringifyOutput: '[0]=&[1]=', noEmptyKeys: {} },
11
-
12
- { input: '=', withEmptyKeys: { '': '' }, noEmptyKeys: {}, stringifyOutput: '=' },
13
- { input: '=&', withEmptyKeys: { '': '' }, stringifyOutput: '=', noEmptyKeys: {} },
14
- { input: '=&&&', withEmptyKeys: { '': '' }, stringifyOutput: '=', noEmptyKeys: {} },
15
- { input: '=&=&=&', withEmptyKeys: { '': ['', '', ''] }, stringifyOutput: '[0]=&[1]=&[2]=', noEmptyKeys: {} },
16
- { input: '=&a[]=b&a[1]=c', withEmptyKeys: { '': '', a: ['b', 'c'] }, stringifyOutput: '=&a[0]=b&a[1]=c', noEmptyKeys: { a: ['b', 'c'] } },
17
- { input: '=a', withEmptyKeys: { '': 'a' }, noEmptyKeys: {}, stringifyOutput: '=a' },
18
- { input: '=a', withEmptyKeys: { '': 'a' }, noEmptyKeys: {}, stringifyOutput: '=a' },
19
- { input: 'a==a', withEmptyKeys: { a: '=a' }, noEmptyKeys: { a: '=a' }, stringifyOutput: 'a==a' },
20
-
21
- { input: '=&a[]=b', withEmptyKeys: { '': '', a: ['b'] }, stringifyOutput: '=&a[0]=b', noEmptyKeys: { a: ['b'] } },
22
- { input: '=&a[]=b&a[]=c&a[2]=d', withEmptyKeys: { '': '', a: ['b', 'c', 'd'] }, stringifyOutput: '=&a[0]=b&a[1]=c&a[2]=d', noEmptyKeys: { a: ['b', 'c', 'd'] } },
23
- { input: '=a&=b', withEmptyKeys: { '': ['a', 'b'] }, stringifyOutput: '[0]=a&[1]=b', noEmptyKeys: {} },
24
- { input: '=a&foo=b', withEmptyKeys: { '': 'a', foo: 'b' }, noEmptyKeys: { foo: 'b' }, stringifyOutput: '=a&foo=b' },
25
-
26
- { input: 'a[]=b&a=c&=', withEmptyKeys: { '': '', a: ['b', 'c'] }, stringifyOutput: '=&a[0]=b&a[1]=c', noEmptyKeys: { a: ['b', 'c'] } },
27
- { input: 'a[]=b&a=c&=', withEmptyKeys: { '': '', a: ['b', 'c'] }, stringifyOutput: '=&a[0]=b&a[1]=c', noEmptyKeys: { a: ['b', 'c'] } },
28
- { input: 'a[0]=b&a=c&=', withEmptyKeys: { '': '', a: ['b', 'c'] }, stringifyOutput: '=&a[0]=b&a[1]=c', noEmptyKeys: { a: ['b', 'c'] } },
29
- { input: 'a=b&a[]=c&=', withEmptyKeys: { '': '', a: ['b', 'c'] }, stringifyOutput: '=&a[0]=b&a[1]=c', noEmptyKeys: { a: ['b', 'c'] } },
30
- { input: 'a=b&a[0]=c&=', withEmptyKeys: { '': '', a: ['b', 'c'] }, stringifyOutput: '=&a[0]=b&a[1]=c', noEmptyKeys: { a: ['b', 'c'] } },
31
-
32
- { input: '[]=a&[]=b& []=1', withEmptyKeys: { '': ['a', 'b'], ' ': ['1'] }, stringifyOutput: '[0]=a&[1]=b& [0]=1', noEmptyKeys: { 0: 'a', 1: 'b', ' ': ['1'] } },
33
- { input: '[0]=a&[1]=b&a[0]=1&a[1]=2', withEmptyKeys: { '': ['a', 'b'], a: ['1', '2'] }, noEmptyKeys: { 0: 'a', 1: 'b', a: ['1', '2'] }, stringifyOutput: '[0]=a&[1]=b&a[0]=1&a[1]=2' },
34
- { input: '[deep]=a&[deep]=2', withEmptyKeys: { '': { deep: ['a', '2'] } }, stringifyOutput: '[deep][0]=a&[deep][1]=2', noEmptyKeys: { deep: ['a', '2'] } },
35
- { input: '%5B0%5D=a&%5B1%5D=b', withEmptyKeys: { '': ['a', 'b'] }, stringifyOutput: '[0]=a&[1]=b', noEmptyKeys: { 0: 'a', 1: 'b' } }
5
+ {
6
+ input: '&',
7
+ withEmptyKeys: {},
8
+ stringifyOutput: {
9
+ brackets: '',
10
+ indices: '',
11
+ repeat: ''
12
+ },
13
+ noEmptyKeys: {}
14
+ },
15
+ {
16
+ input: '&&',
17
+ withEmptyKeys: {},
18
+ stringifyOutput: {
19
+ brackets: '',
20
+ indices: '',
21
+ repeat: ''
22
+ },
23
+ noEmptyKeys: {}
24
+ },
25
+ {
26
+ input: '&=',
27
+ withEmptyKeys: { '': '' },
28
+ stringifyOutput: {
29
+ brackets: '=',
30
+ indices: '=',
31
+ repeat: '='
32
+ },
33
+ noEmptyKeys: {}
34
+ },
35
+ {
36
+ input: '&=&',
37
+ withEmptyKeys: { '': '' },
38
+ stringifyOutput: {
39
+ brackets: '=',
40
+ indices: '=',
41
+ repeat: '='
42
+ },
43
+ noEmptyKeys: {}
44
+ },
45
+ {
46
+ input: '&=&=',
47
+ withEmptyKeys: { '': ['', ''] },
48
+ stringifyOutput: {
49
+ brackets: '[]=&[]=',
50
+ indices: '[0]=&[1]=',
51
+ repeat: '=&='
52
+ },
53
+ noEmptyKeys: {}
54
+ },
55
+ {
56
+ input: '&=&=&',
57
+ withEmptyKeys: { '': ['', ''] },
58
+ stringifyOutput: {
59
+ brackets: '[]=&[]=',
60
+ indices: '[0]=&[1]=',
61
+ repeat: '=&='
62
+ },
63
+ noEmptyKeys: {}
64
+ },
65
+ {
66
+ input: '=',
67
+ withEmptyKeys: { '': '' },
68
+ noEmptyKeys: {},
69
+ stringifyOutput: {
70
+ brackets: '=',
71
+ indices: '=',
72
+ repeat: '='
73
+ }
74
+ },
75
+ {
76
+ input: '=&',
77
+ withEmptyKeys: { '': '' },
78
+ stringifyOutput: {
79
+ brackets: '=',
80
+ indices: '=',
81
+ repeat: '='
82
+ },
83
+ noEmptyKeys: {}
84
+ },
85
+ {
86
+ input: '=&&&',
87
+ withEmptyKeys: { '': '' },
88
+ stringifyOutput: {
89
+ brackets: '=',
90
+ indices: '=',
91
+ repeat: '='
92
+ },
93
+ noEmptyKeys: {}
94
+ },
95
+ {
96
+ input: '=&=&=&',
97
+ withEmptyKeys: { '': ['', '', ''] },
98
+ stringifyOutput: {
99
+ brackets: '[]=&[]=&[]=',
100
+ indices: '[0]=&[1]=&[2]=',
101
+ repeat: '=&=&='
102
+ },
103
+ noEmptyKeys: {}
104
+ },
105
+ {
106
+ input: '=&a[]=b&a[1]=c',
107
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
108
+ stringifyOutput: {
109
+ brackets: '=&a[]=b&a[]=c',
110
+ indices: '=&a[0]=b&a[1]=c',
111
+ repeat: '=&a=b&a=c'
112
+ },
113
+ noEmptyKeys: { a: ['b', 'c'] }
114
+ },
115
+ {
116
+ input: '=a',
117
+ withEmptyKeys: { '': 'a' },
118
+ noEmptyKeys: {},
119
+ stringifyOutput: {
120
+ brackets: '=a',
121
+ indices: '=a',
122
+ repeat: '=a'
123
+ }
124
+ },
125
+ {
126
+ input: 'a==a',
127
+ withEmptyKeys: { a: '=a' },
128
+ noEmptyKeys: { a: '=a' },
129
+ stringifyOutput: {
130
+ brackets: 'a==a',
131
+ indices: 'a==a',
132
+ repeat: 'a==a'
133
+ }
134
+ },
135
+ {
136
+ input: '=&a[]=b',
137
+ withEmptyKeys: { '': '', a: ['b'] },
138
+ stringifyOutput: {
139
+ brackets: '=&a[]=b',
140
+ indices: '=&a[0]=b',
141
+ repeat: '=&a=b'
142
+ },
143
+ noEmptyKeys: { a: ['b'] }
144
+ },
145
+ {
146
+ input: '=&a[]=b&a[]=c&a[2]=d',
147
+ withEmptyKeys: { '': '', a: ['b', 'c', 'd'] },
148
+ stringifyOutput: {
149
+ brackets: '=&a[]=b&a[]=c&a[]=d',
150
+ indices: '=&a[0]=b&a[1]=c&a[2]=d',
151
+ repeat: '=&a=b&a=c&a=d'
152
+ },
153
+ noEmptyKeys: { a: ['b', 'c', 'd'] }
154
+ },
155
+ {
156
+ input: '=a&=b',
157
+ withEmptyKeys: { '': ['a', 'b'] },
158
+ stringifyOutput: {
159
+ brackets: '[]=a&[]=b',
160
+ indices: '[0]=a&[1]=b',
161
+ repeat: '=a&=b'
162
+ },
163
+ noEmptyKeys: {}
164
+ },
165
+ {
166
+ input: '=a&foo=b',
167
+ withEmptyKeys: { '': 'a', foo: 'b' },
168
+ noEmptyKeys: { foo: 'b' },
169
+ stringifyOutput: {
170
+ brackets: '=a&foo=b',
171
+ indices: '=a&foo=b',
172
+ repeat: '=a&foo=b'
173
+ }
174
+ },
175
+ {
176
+ input: 'a[]=b&a=c&=',
177
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
178
+ stringifyOutput: {
179
+ brackets: '=&a[]=b&a[]=c',
180
+ indices: '=&a[0]=b&a[1]=c',
181
+ repeat: '=&a=b&a=c'
182
+ },
183
+ noEmptyKeys: { a: ['b', 'c'] }
184
+ },
185
+ {
186
+ input: 'a[]=b&a=c&=',
187
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
188
+ stringifyOutput: {
189
+ brackets: '=&a[]=b&a[]=c',
190
+ indices: '=&a[0]=b&a[1]=c',
191
+ repeat: '=&a=b&a=c'
192
+ },
193
+ noEmptyKeys: { a: ['b', 'c'] }
194
+ },
195
+ {
196
+ input: 'a[0]=b&a=c&=',
197
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
198
+ stringifyOutput: {
199
+ brackets: '=&a[]=b&a[]=c',
200
+ indices: '=&a[0]=b&a[1]=c',
201
+ repeat: '=&a=b&a=c'
202
+ },
203
+ noEmptyKeys: { a: ['b', 'c'] }
204
+ },
205
+ {
206
+ input: 'a=b&a[]=c&=',
207
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
208
+ stringifyOutput: {
209
+ brackets: '=&a[]=b&a[]=c',
210
+ indices: '=&a[0]=b&a[1]=c',
211
+ repeat: '=&a=b&a=c'
212
+ },
213
+ noEmptyKeys: { a: ['b', 'c'] }
214
+ },
215
+ {
216
+ input: 'a=b&a[0]=c&=',
217
+ withEmptyKeys: { '': '', a: ['b', 'c'] },
218
+ stringifyOutput: {
219
+ brackets: '=&a[]=b&a[]=c',
220
+ indices: '=&a[0]=b&a[1]=c',
221
+ repeat: '=&a=b&a=c'
222
+ },
223
+ noEmptyKeys: { a: ['b', 'c'] }
224
+ },
225
+ {
226
+ input: '[]=a&[]=b& []=1',
227
+ withEmptyKeys: { '': ['a', 'b'], ' ': ['1'] },
228
+ stringifyOutput: {
229
+ brackets: '[]=a&[]=b& []=1',
230
+ indices: '[0]=a&[1]=b& [0]=1',
231
+ repeat: '=a&=b& =1'
232
+ },
233
+ noEmptyKeys: { 0: 'a', 1: 'b', ' ': ['1'] }
234
+ },
235
+ {
236
+ input: '[0]=a&[1]=b&a[0]=1&a[1]=2',
237
+ withEmptyKeys: { '': ['a', 'b'], a: ['1', '2'] },
238
+ noEmptyKeys: { 0: 'a', 1: 'b', a: ['1', '2'] },
239
+ stringifyOutput: {
240
+ brackets: '[]=a&[]=b&a[]=1&a[]=2',
241
+ indices: '[0]=a&[1]=b&a[0]=1&a[1]=2',
242
+ repeat: '=a&=b&a=1&a=2'
243
+ }
244
+ },
245
+ {
246
+ input: '[deep]=a&[deep]=2',
247
+ withEmptyKeys: { '': { deep: ['a', '2'] }
248
+ },
249
+ stringifyOutput: {
250
+ brackets: '[deep][]=a&[deep][]=2',
251
+ indices: '[deep][0]=a&[deep][1]=2',
252
+ repeat: '[deep]=a&[deep]=2'
253
+ },
254
+ noEmptyKeys: { deep: ['a', '2'] }
255
+ },
256
+ {
257
+ input: '%5B0%5D=a&%5B1%5D=b',
258
+ withEmptyKeys: { '': ['a', 'b'] },
259
+ stringifyOutput: {
260
+ brackets: '[]=a&[]=b',
261
+ indices: '[0]=a&[1]=b',
262
+ repeat: '=a&=b'
263
+ },
264
+ noEmptyKeys: { 0: 'a', 1: 'b' }
265
+ }
36
266
  ]
37
267
  };