node-red-contrib-web-worldmap 2.31.0 → 2.31.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 +2 -0
- package/README.md +2 -1
- package/node_modules/accepts/package.json +15 -55
- package/node_modules/body-parser/HISTORY.md +6 -0
- package/node_modules/body-parser/README.md +1 -1
- package/node_modules/body-parser/index.js +8 -9
- package/node_modules/body-parser/node_modules/bytes/package.json +20 -62
- package/node_modules/body-parser/package.json +18 -57
- package/node_modules/bufferjs/package.json +17 -65
- package/node_modules/bufferlist/package.json +15 -51
- package/node_modules/{compression/node_modules/bytes → bytes}/History.md +0 -0
- package/node_modules/{compression/node_modules/bytes → bytes}/LICENSE +0 -0
- package/node_modules/{compression/node_modules/bytes → bytes}/Readme.md +0 -0
- package/node_modules/{compression/node_modules/bytes → bytes}/index.js +0 -0
- package/node_modules/bytes/package.json +39 -0
- package/node_modules/cgi/package.json +10 -46
- package/node_modules/compressible/package.json +15 -58
- package/node_modules/express/History.md +9 -0
- package/node_modules/express/Readme.md +2 -2
- package/node_modules/express/lib/router/route.js +8 -8
- package/node_modules/express/package.json +33 -88
- package/node_modules/get-intrinsic/package.json +89 -118
- package/node_modules/header-stack/package.json +14 -48
- package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/LICENSE.md +0 -0
- package/node_modules/http-parser-js/README.md +43 -0
- package/node_modules/http-parser-js/http-parser.d.ts +175 -0
- package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/http-parser.js +12 -7
- package/node_modules/http-parser-js/package.json +30 -0
- package/node_modules/mime-db/HISTORY.md +8 -0
- package/node_modules/mime-db/LICENSE +19 -18
- package/node_modules/mime-db/README.md +1 -1
- package/node_modules/mime-db/db.json +54 -6
- package/node_modules/mime-db/index.js +1 -0
- package/node_modules/mime-db/package.json +24 -67
- package/node_modules/mime-types/HISTORY.md +9 -0
- package/node_modules/mime-types/README.md +1 -1
- package/node_modules/mime-types/package.json +19 -63
- package/node_modules/ms/package.json +19 -54
- package/node_modules/negotiator/package.json +19 -61
- package/node_modules/qs/.editorconfig +3 -0
- package/node_modules/qs/.eslintrc +5 -5
- package/node_modules/qs/CHANGELOG.md +158 -0
- package/node_modules/qs/README.md +3 -1
- package/node_modules/qs/dist/qs.js +19 -9
- package/node_modules/qs/lib/stringify.js +12 -3
- package/node_modules/qs/package.json +73 -98
- package/node_modules/qs/test/parse.js +14 -0
- package/node_modules/qs/test/stringify.js +54 -10
- package/node_modules/raw-body/node_modules/bytes/package.json +20 -62
- package/node_modules/stream-stack/package.json +11 -43
- package/node_modules/vary/package.json +13 -52
- package/package.json +1 -1
- package/worldmap/worldmap.js +11 -2
- package/node_modules/compression/node_modules/bytes/package.json +0 -84
- package/node_modules/websocket-driver/node_modules/http-parser-js/CHANGELOG.md +0 -14
- package/node_modules/websocket-driver/node_modules/http-parser-js/README.md +0 -31
- package/node_modules/websocket-driver/node_modules/http-parser-js/package.json +0 -75
|
@@ -62,6 +62,7 @@ var stringify = function stringify(
|
|
|
62
62
|
object,
|
|
63
63
|
prefix,
|
|
64
64
|
generateArrayPrefix,
|
|
65
|
+
commaRoundTrip,
|
|
65
66
|
strictNullHandling,
|
|
66
67
|
skipNulls,
|
|
67
68
|
encoder,
|
|
@@ -126,7 +127,7 @@ var stringify = function stringify(
|
|
|
126
127
|
for (var i = 0; i < valuesArray.length; ++i) {
|
|
127
128
|
valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults.encoder, charset, 'value', format));
|
|
128
129
|
}
|
|
129
|
-
return [formatter(keyValue) + '=' + valuesJoined];
|
|
130
|
+
return [formatter(keyValue) + (commaRoundTrip && isArray(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
|
|
130
131
|
}
|
|
131
132
|
return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults.encoder, charset, 'value', format))];
|
|
132
133
|
}
|
|
@@ -150,6 +151,8 @@ var stringify = function stringify(
|
|
|
150
151
|
objKeys = sort ? keys.sort(sort) : keys;
|
|
151
152
|
}
|
|
152
153
|
|
|
154
|
+
var adjustedPrefix = commaRoundTrip && isArray(obj) && obj.length === 1 ? prefix + '[]' : prefix;
|
|
155
|
+
|
|
153
156
|
for (var j = 0; j < objKeys.length; ++j) {
|
|
154
157
|
var key = objKeys[j];
|
|
155
158
|
var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
|
|
@@ -159,8 +162,8 @@ var stringify = function stringify(
|
|
|
159
162
|
}
|
|
160
163
|
|
|
161
164
|
var keyPrefix = isArray(obj)
|
|
162
|
-
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(
|
|
163
|
-
:
|
|
165
|
+
? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
|
|
166
|
+
: adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
|
|
164
167
|
|
|
165
168
|
sideChannel.set(object, step);
|
|
166
169
|
var valueSideChannel = getSideChannel();
|
|
@@ -169,6 +172,7 @@ var stringify = function stringify(
|
|
|
169
172
|
value,
|
|
170
173
|
keyPrefix,
|
|
171
174
|
generateArrayPrefix,
|
|
175
|
+
commaRoundTrip,
|
|
172
176
|
strictNullHandling,
|
|
173
177
|
skipNulls,
|
|
174
178
|
encoder,
|
|
@@ -265,6 +269,10 @@ module.exports = function (object, opts) {
|
|
|
265
269
|
}
|
|
266
270
|
|
|
267
271
|
var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
|
|
272
|
+
if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
|
|
273
|
+
throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
|
|
274
|
+
}
|
|
275
|
+
var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
|
|
268
276
|
|
|
269
277
|
if (!objKeys) {
|
|
270
278
|
objKeys = Object.keys(obj);
|
|
@@ -285,6 +293,7 @@ module.exports = function (object, opts) {
|
|
|
285
293
|
obj[key],
|
|
286
294
|
key,
|
|
287
295
|
generateArrayPrefix,
|
|
296
|
+
commaRoundTrip,
|
|
288
297
|
options.strictNullHandling,
|
|
289
298
|
options.skipNulls,
|
|
290
299
|
options.encode ? options.encoder : null,
|
|
@@ -1,102 +1,77 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_from": "qs@6.10.3",
|
|
3
|
-
"_id": "qs@6.10.3",
|
|
4
|
-
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-wr7M2E0OFRfIfJZjKGieI8lBKb7fRCH4Fv5KNPEs7gJ8jadvotdsS08PzOKR7opXhZ/Xkjtt3WF9g38drmyRqQ==",
|
|
6
|
-
"_location": "/qs",
|
|
7
|
-
"_phantomChildren": {},
|
|
8
|
-
"_requested": {
|
|
9
|
-
"type": "version",
|
|
10
|
-
"registry": true,
|
|
11
|
-
"raw": "qs@6.10.3",
|
|
12
2
|
"name": "qs",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
3
|
+
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
|
|
4
|
+
"homepage": "https://github.com/ljharb/qs",
|
|
5
|
+
"version": "6.11.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/ljharb/qs.git"
|
|
9
|
+
},
|
|
10
|
+
"funding": {
|
|
11
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
12
|
+
},
|
|
13
|
+
"main": "lib/index.js",
|
|
14
|
+
"contributors": [
|
|
15
|
+
{
|
|
16
|
+
"name": "Jordan Harband",
|
|
17
|
+
"email": "ljharb@gmail.com",
|
|
18
|
+
"url": "http://ljharb.codes"
|
|
19
|
+
}
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"querystring",
|
|
23
|
+
"qs",
|
|
24
|
+
"query",
|
|
25
|
+
"url",
|
|
26
|
+
"parse",
|
|
27
|
+
"stringify"
|
|
28
|
+
],
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=0.6"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"side-channel": "^1.0.4"
|
|
34
|
+
},
|
|
35
|
+
"devDependencies": {
|
|
36
|
+
"@ljharb/eslint-config": "^21.0.0",
|
|
37
|
+
"aud": "^2.0.0",
|
|
38
|
+
"browserify": "^16.5.2",
|
|
39
|
+
"eclint": "^2.8.1",
|
|
40
|
+
"eslint": "=8.8.0",
|
|
41
|
+
"evalmd": "^0.0.19",
|
|
42
|
+
"for-each": "^0.3.3",
|
|
43
|
+
"has-symbols": "^1.0.3",
|
|
44
|
+
"iconv-lite": "^0.5.1",
|
|
45
|
+
"in-publish": "^2.0.1",
|
|
46
|
+
"mkdirp": "^0.5.5",
|
|
47
|
+
"npmignore": "^0.3.0",
|
|
48
|
+
"nyc": "^10.3.2",
|
|
49
|
+
"object-inspect": "^1.12.2",
|
|
50
|
+
"qs-iconv": "^1.0.4",
|
|
51
|
+
"safe-publish-latest": "^2.0.0",
|
|
52
|
+
"safer-buffer": "^2.1.2",
|
|
53
|
+
"tape": "^5.5.3"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
57
|
+
"prepublishOnly": "safe-publish-latest && npm run dist",
|
|
58
|
+
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
59
|
+
"pretest": "npm run --silent readme && npm run --silent lint",
|
|
60
|
+
"test": "npm run tests-only",
|
|
61
|
+
"tests-only": "nyc tape 'test/**/*.js'",
|
|
62
|
+
"posttest": "aud --production",
|
|
63
|
+
"readme": "evalmd README.md",
|
|
64
|
+
"postlint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
|
|
65
|
+
"lint": "eslint --ext=js,mjs .",
|
|
66
|
+
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js"
|
|
67
|
+
},
|
|
68
|
+
"license": "BSD-3-Clause",
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"ignore": [
|
|
71
|
+
"!dist/*",
|
|
72
|
+
"bower.json",
|
|
73
|
+
"component.json",
|
|
74
|
+
".github/workflows"
|
|
75
|
+
]
|
|
35
76
|
}
|
|
36
|
-
],
|
|
37
|
-
"dependencies": {
|
|
38
|
-
"side-channel": "^1.0.4"
|
|
39
|
-
},
|
|
40
|
-
"deprecated": false,
|
|
41
|
-
"description": "A querystring parser that supports nesting and arrays, with a depth limit",
|
|
42
|
-
"devDependencies": {
|
|
43
|
-
"@ljharb/eslint-config": "^20.1.0",
|
|
44
|
-
"aud": "^1.1.5",
|
|
45
|
-
"browserify": "^16.5.2",
|
|
46
|
-
"eclint": "^2.8.1",
|
|
47
|
-
"eslint": "^8.6.0",
|
|
48
|
-
"evalmd": "^0.0.19",
|
|
49
|
-
"for-each": "^0.3.3",
|
|
50
|
-
"has-symbols": "^1.0.2",
|
|
51
|
-
"iconv-lite": "^0.5.1",
|
|
52
|
-
"in-publish": "^2.0.1",
|
|
53
|
-
"mkdirp": "^0.5.5",
|
|
54
|
-
"nyc": "^10.3.2",
|
|
55
|
-
"object-inspect": "^1.12.0",
|
|
56
|
-
"qs-iconv": "^1.0.4",
|
|
57
|
-
"safe-publish-latest": "^2.0.0",
|
|
58
|
-
"safer-buffer": "^2.1.2",
|
|
59
|
-
"tape": "^5.4.0"
|
|
60
|
-
},
|
|
61
|
-
"engines": {
|
|
62
|
-
"node": ">=0.6"
|
|
63
|
-
},
|
|
64
|
-
"funding": {
|
|
65
|
-
"url": "https://github.com/sponsors/ljharb"
|
|
66
|
-
},
|
|
67
|
-
"greenkeeper": {
|
|
68
|
-
"ignore": [
|
|
69
|
-
"iconv-lite",
|
|
70
|
-
"mkdirp"
|
|
71
|
-
]
|
|
72
|
-
},
|
|
73
|
-
"homepage": "https://github.com/ljharb/qs",
|
|
74
|
-
"keywords": [
|
|
75
|
-
"querystring",
|
|
76
|
-
"qs",
|
|
77
|
-
"query",
|
|
78
|
-
"url",
|
|
79
|
-
"parse",
|
|
80
|
-
"stringify"
|
|
81
|
-
],
|
|
82
|
-
"license": "BSD-3-Clause",
|
|
83
|
-
"main": "lib/index.js",
|
|
84
|
-
"name": "qs",
|
|
85
|
-
"repository": {
|
|
86
|
-
"type": "git",
|
|
87
|
-
"url": "git+https://github.com/ljharb/qs.git"
|
|
88
|
-
},
|
|
89
|
-
"scripts": {
|
|
90
|
-
"dist": "mkdirp dist && browserify --standalone Qs lib/index.js > dist/qs.js",
|
|
91
|
-
"lint": "eslint .",
|
|
92
|
-
"postlint": "eclint check * lib/* test/* !dist/*",
|
|
93
|
-
"posttest": "aud --production",
|
|
94
|
-
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
95
|
-
"prepublishOnly": "safe-publish-latest && npm run dist",
|
|
96
|
-
"pretest": "npm run --silent readme && npm run --silent lint",
|
|
97
|
-
"readme": "evalmd README.md",
|
|
98
|
-
"test": "npm run tests-only",
|
|
99
|
-
"tests-only": "nyc tape 'test/**/*.js'"
|
|
100
|
-
},
|
|
101
|
-
"version": "6.10.3"
|
|
102
77
|
}
|
|
@@ -140,6 +140,9 @@ test('parse()', function (t) {
|
|
|
140
140
|
t.test('limits specific array indices to arrayLimit', function (st) {
|
|
141
141
|
st.deepEqual(qs.parse('a[20]=a', { arrayLimit: 20 }), { a: ['a'] });
|
|
142
142
|
st.deepEqual(qs.parse('a[21]=a', { arrayLimit: 20 }), { a: { 21: 'a' } });
|
|
143
|
+
|
|
144
|
+
st.deepEqual(qs.parse('a[20]=a'), { a: ['a'] });
|
|
145
|
+
st.deepEqual(qs.parse('a[21]=a'), { a: { 21: 'a' } });
|
|
143
146
|
st.end();
|
|
144
147
|
});
|
|
145
148
|
|
|
@@ -378,6 +381,7 @@ test('parse()', function (t) {
|
|
|
378
381
|
st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
|
|
379
382
|
st.deepEqual(qs.parse('foo=bar', { ignoreQueryPrefix: true }), { foo: 'bar' });
|
|
380
383
|
st.deepEqual(qs.parse('?foo=bar', { ignoreQueryPrefix: false }), { '?foo': 'bar' });
|
|
384
|
+
|
|
381
385
|
st.end();
|
|
382
386
|
});
|
|
383
387
|
|
|
@@ -406,6 +410,16 @@ test('parse()', function (t) {
|
|
|
406
410
|
st.deepEqual(qs.parse('foo=', { comma: true }), { foo: '' });
|
|
407
411
|
st.deepEqual(qs.parse('foo', { comma: true }), { foo: '' });
|
|
408
412
|
st.deepEqual(qs.parse('foo', { comma: true, strictNullHandling: true }), { foo: null });
|
|
413
|
+
|
|
414
|
+
// test cases inversed from from stringify tests
|
|
415
|
+
st.deepEqual(qs.parse('a[0]=c'), { a: ['c'] });
|
|
416
|
+
st.deepEqual(qs.parse('a[]=c'), { a: ['c'] });
|
|
417
|
+
st.deepEqual(qs.parse('a[]=c', { comma: true }), { a: ['c'] });
|
|
418
|
+
|
|
419
|
+
st.deepEqual(qs.parse('a[0]=c&a[1]=d'), { a: ['c', 'd'] });
|
|
420
|
+
st.deepEqual(qs.parse('a[]=c&a[]=d'), { a: ['c', 'd'] });
|
|
421
|
+
st.deepEqual(qs.parse('a=c,d', { comma: true }), { a: ['c', 'd'] });
|
|
422
|
+
|
|
409
423
|
st.end();
|
|
410
424
|
});
|
|
411
425
|
|
|
@@ -131,6 +131,38 @@ test('stringify()', function (t) {
|
|
|
131
131
|
st.end();
|
|
132
132
|
});
|
|
133
133
|
|
|
134
|
+
t.test('stringifies an array value with one item vs multiple items', function (st) {
|
|
135
|
+
st.test('non-array item', function (s2t) {
|
|
136
|
+
s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a=c');
|
|
137
|
+
s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a=c');
|
|
138
|
+
s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c');
|
|
139
|
+
s2t.equal(qs.stringify({ a: 'c' }, { encodeValuesOnly: true }), 'a=c');
|
|
140
|
+
|
|
141
|
+
s2t.end();
|
|
142
|
+
});
|
|
143
|
+
|
|
144
|
+
st.test('array with a single item', function (s2t) {
|
|
145
|
+
s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c');
|
|
146
|
+
s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c');
|
|
147
|
+
s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c');
|
|
148
|
+
s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true, arrayFormat: 'comma', commaRoundTrip: true }), 'a[]=c'); // so it parses back as an array
|
|
149
|
+
s2t.equal(qs.stringify({ a: ['c'] }, { encodeValuesOnly: true }), 'a[0]=c');
|
|
150
|
+
|
|
151
|
+
s2t.end();
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
st.test('array with multiple items', function (s2t) {
|
|
155
|
+
s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[0]=c&a[1]=d');
|
|
156
|
+
s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[]=c&a[]=d');
|
|
157
|
+
s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true, arrayFormat: 'comma' }), 'a=c,d');
|
|
158
|
+
s2t.equal(qs.stringify({ a: ['c', 'd'] }, { encodeValuesOnly: true }), 'a[0]=c&a[1]=d');
|
|
159
|
+
|
|
160
|
+
s2t.end();
|
|
161
|
+
});
|
|
162
|
+
|
|
163
|
+
st.end();
|
|
164
|
+
});
|
|
165
|
+
|
|
134
166
|
t.test('stringifies a nested array value', function (st) {
|
|
135
167
|
st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'indices' }), 'a[b][0]=c&a[b][1]=d');
|
|
136
168
|
st.equal(qs.stringify({ a: { b: ['c', 'd'] } }, { encodeValuesOnly: true, arrayFormat: 'brackets' }), 'a[b][]=c&a[b][]=d');
|
|
@@ -349,11 +381,13 @@ test('stringify()', function (t) {
|
|
|
349
381
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets' }), 'b[]=&c=c');
|
|
350
382
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat' }), 'b=&c=c');
|
|
351
383
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma' }), 'b=&c=c');
|
|
384
|
+
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', commaRoundTrip: true }), 'b[]=&c=c');
|
|
352
385
|
// with strictNullHandling
|
|
353
386
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', strictNullHandling: true }), 'b[0]&c=c');
|
|
354
387
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', strictNullHandling: true }), 'b[]&c=c');
|
|
355
388
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'repeat', strictNullHandling: true }), 'b&c=c');
|
|
356
389
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true }), 'b&c=c');
|
|
390
|
+
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'comma', strictNullHandling: true, commaRoundTrip: true }), 'b[]&c=c');
|
|
357
391
|
// with skipNulls
|
|
358
392
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'indices', skipNulls: true }), 'c=c');
|
|
359
393
|
st.equal(qs.stringify({ a: [], b: [null], c: 'c' }, { encode: false, arrayFormat: 'brackets', skipNulls: true }), 'c=c');
|
|
@@ -684,6 +718,18 @@ test('stringify()', function (t) {
|
|
|
684
718
|
'a=' + date.getTime(),
|
|
685
719
|
'works with arrayFormat comma'
|
|
686
720
|
);
|
|
721
|
+
st.equal(
|
|
722
|
+
qs.stringify(
|
|
723
|
+
{ a: [date] },
|
|
724
|
+
{
|
|
725
|
+
serializeDate: function (d) { return d.getTime(); },
|
|
726
|
+
arrayFormat: 'comma',
|
|
727
|
+
commaRoundTrip: true
|
|
728
|
+
}
|
|
729
|
+
),
|
|
730
|
+
'a%5B%5D=' + date.getTime(),
|
|
731
|
+
'works with arrayFormat comma'
|
|
732
|
+
);
|
|
687
733
|
|
|
688
734
|
st.end();
|
|
689
735
|
});
|
|
@@ -714,16 +760,14 @@ test('stringify()', function (t) {
|
|
|
714
760
|
});
|
|
715
761
|
|
|
716
762
|
t.test('Edge cases and unknown formats', function (st) {
|
|
717
|
-
['UFO1234', false, 1234, null, {}, []].forEach(
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
}
|
|
726
|
-
);
|
|
763
|
+
['UFO1234', false, 1234, null, {}, []].forEach(function (format) {
|
|
764
|
+
st['throws'](
|
|
765
|
+
function () {
|
|
766
|
+
qs.stringify({ a: 'b c' }, { format: format });
|
|
767
|
+
},
|
|
768
|
+
new TypeError('Unknown format option provided.')
|
|
769
|
+
);
|
|
770
|
+
});
|
|
727
771
|
st.end();
|
|
728
772
|
});
|
|
729
773
|
|
|
@@ -1,84 +1,42 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"_location": "/node-red-contrib-web-worldmap/raw-body/bytes",
|
|
7
|
-
"_phantomChildren": {},
|
|
8
|
-
"_requested": {
|
|
9
|
-
"type": "version",
|
|
10
|
-
"registry": true,
|
|
11
|
-
"raw": "bytes@3.1.2",
|
|
12
|
-
"name": "bytes",
|
|
13
|
-
"escapedName": "bytes",
|
|
14
|
-
"rawSpec": "3.1.2",
|
|
15
|
-
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "3.1.2"
|
|
17
|
-
},
|
|
18
|
-
"_requiredBy": [
|
|
19
|
-
"/node-red-contrib-web-worldmap/raw-body"
|
|
20
|
-
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
|
22
|
-
"_shasum": "8b0beeb98605adf1b128fa4386403c009e0221a5",
|
|
23
|
-
"_spec": "bytes@3.1.2",
|
|
24
|
-
"_where": "/Users/conway/Projects/worldmap/node_modules/raw-body",
|
|
25
|
-
"author": {
|
|
26
|
-
"name": "TJ Holowaychuk",
|
|
27
|
-
"email": "tj@vision-media.ca",
|
|
28
|
-
"url": "http://tjholowaychuk.com"
|
|
29
|
-
},
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/visionmedia/bytes.js/issues"
|
|
32
|
-
},
|
|
33
|
-
"bundleDependencies": false,
|
|
2
|
+
"name": "bytes",
|
|
3
|
+
"description": "Utility to parse a string bytes to bytes and vice-versa",
|
|
4
|
+
"version": "3.1.2",
|
|
5
|
+
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
|
|
34
6
|
"contributors": [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"email": "jed.watson@me.com"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "Théo FIDRY",
|
|
41
|
-
"email": "theo.fidry@gmail.com"
|
|
42
|
-
}
|
|
7
|
+
"Jed Watson <jed.watson@me.com>",
|
|
8
|
+
"Théo FIDRY <theo.fidry@gmail.com>"
|
|
43
9
|
],
|
|
44
|
-
"
|
|
45
|
-
"
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"byte",
|
|
13
|
+
"bytes",
|
|
14
|
+
"utility",
|
|
15
|
+
"parse",
|
|
16
|
+
"parser",
|
|
17
|
+
"convert",
|
|
18
|
+
"converter"
|
|
19
|
+
],
|
|
20
|
+
"repository": "visionmedia/bytes.js",
|
|
46
21
|
"devDependencies": {
|
|
47
22
|
"eslint": "7.32.0",
|
|
48
23
|
"eslint-plugin-markdown": "2.2.1",
|
|
49
24
|
"mocha": "9.2.0",
|
|
50
25
|
"nyc": "15.1.0"
|
|
51
26
|
},
|
|
52
|
-
"engines": {
|
|
53
|
-
"node": ">= 0.8"
|
|
54
|
-
},
|
|
55
27
|
"files": [
|
|
56
28
|
"History.md",
|
|
57
29
|
"LICENSE",
|
|
58
30
|
"Readme.md",
|
|
59
31
|
"index.js"
|
|
60
32
|
],
|
|
61
|
-
"
|
|
62
|
-
|
|
63
|
-
"byte",
|
|
64
|
-
"bytes",
|
|
65
|
-
"utility",
|
|
66
|
-
"parse",
|
|
67
|
-
"parser",
|
|
68
|
-
"convert",
|
|
69
|
-
"converter"
|
|
70
|
-
],
|
|
71
|
-
"license": "MIT",
|
|
72
|
-
"name": "bytes",
|
|
73
|
-
"repository": {
|
|
74
|
-
"type": "git",
|
|
75
|
-
"url": "git+https://github.com/visionmedia/bytes.js.git"
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">= 0.8"
|
|
76
35
|
},
|
|
77
36
|
"scripts": {
|
|
78
37
|
"lint": "eslint .",
|
|
79
38
|
"test": "mocha --check-leaks --reporter spec",
|
|
80
39
|
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
81
40
|
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
82
|
-
}
|
|
83
|
-
"version": "3.1.2"
|
|
41
|
+
}
|
|
84
42
|
}
|
|
@@ -1,56 +1,24 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
[
|
|
4
|
-
"stream-stack@1.1.4",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "stream-stack@1.1.4",
|
|
9
|
-
"_id": "stream-stack@1.1.4",
|
|
10
|
-
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha1-cIRgQrqwGFAI5Qnt/h93+TYcumk=",
|
|
12
|
-
"_location": "/stream-stack",
|
|
13
|
-
"_phantomChildren": {},
|
|
14
|
-
"_requested": {
|
|
15
|
-
"type": "version",
|
|
16
|
-
"registry": true,
|
|
17
|
-
"raw": "stream-stack@1.1.4",
|
|
18
|
-
"name": "stream-stack",
|
|
19
|
-
"escapedName": "stream-stack",
|
|
20
|
-
"rawSpec": "1.1.4",
|
|
21
|
-
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "1.1.4"
|
|
23
|
-
},
|
|
24
|
-
"_requiredBy": [
|
|
25
|
-
"/cgi",
|
|
26
|
-
"/header-stack"
|
|
27
|
-
],
|
|
28
|
-
"_resolved": "https://registry.npmjs.org/stream-stack/-/stream-stack-1.1.4.tgz",
|
|
29
|
-
"_spec": "1.1.4",
|
|
30
|
-
"_where": "/Users/conway/Projects/worldmap",
|
|
31
|
-
"author": {
|
|
32
|
-
"name": "Nathan Rajlich",
|
|
33
|
-
"email": "nathan@tootallnate.net"
|
|
34
|
-
},
|
|
35
|
-
"dependencies": {},
|
|
2
|
+
"name": "stream-stack",
|
|
36
3
|
"description": "Filter low-level `Stream` instances into stackable, protocol-based streams.",
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
"directories": {},
|
|
41
|
-
"engines": {
|
|
42
|
-
"node": ">= 0.3.0"
|
|
43
|
-
},
|
|
4
|
+
"version": "1.1.4",
|
|
5
|
+
"author": "Nathan Rajlich <nathan@tootallnate.net>",
|
|
44
6
|
"keywords": [
|
|
45
7
|
"stream",
|
|
46
8
|
"stack",
|
|
47
9
|
"protocol",
|
|
48
10
|
"filter"
|
|
49
11
|
],
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"expresso": "*"
|
|
14
|
+
},
|
|
50
15
|
"main": "./stream-stack",
|
|
51
|
-
"name": "stream-stack",
|
|
52
16
|
"scripts": {
|
|
53
17
|
"test": "expresso"
|
|
54
18
|
},
|
|
55
|
-
"
|
|
19
|
+
"engines": {
|
|
20
|
+
"node": ">= 0.3.0"
|
|
21
|
+
},
|
|
22
|
+
"directories": {},
|
|
23
|
+
"dependencies": {}
|
|
56
24
|
}
|
|
@@ -1,41 +1,15 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
[
|
|
4
|
-
"vary@1.1.2",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "vary@1.1.2",
|
|
9
|
-
"_id": "vary@1.1.2",
|
|
10
|
-
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=",
|
|
12
|
-
"_location": "/vary",
|
|
13
|
-
"_phantomChildren": {},
|
|
14
|
-
"_requested": {
|
|
15
|
-
"type": "version",
|
|
16
|
-
"registry": true,
|
|
17
|
-
"raw": "vary@1.1.2",
|
|
18
|
-
"name": "vary",
|
|
19
|
-
"escapedName": "vary",
|
|
20
|
-
"rawSpec": "1.1.2",
|
|
21
|
-
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "1.1.2"
|
|
23
|
-
},
|
|
24
|
-
"_requiredBy": [
|
|
25
|
-
"/compression",
|
|
26
|
-
"/express"
|
|
27
|
-
],
|
|
28
|
-
"_resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
|
|
29
|
-
"_spec": "1.1.2",
|
|
30
|
-
"_where": "/Users/conway/Projects/worldmap",
|
|
31
|
-
"author": {
|
|
32
|
-
"name": "Douglas Christopher Wilson",
|
|
33
|
-
"email": "doug@somethingdoug.com"
|
|
34
|
-
},
|
|
35
|
-
"bugs": {
|
|
36
|
-
"url": "https://github.com/jshttp/vary/issues"
|
|
37
|
-
},
|
|
2
|
+
"name": "vary",
|
|
38
3
|
"description": "Manipulate the HTTP Vary header",
|
|
4
|
+
"version": "1.1.2",
|
|
5
|
+
"author": "Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"keywords": [
|
|
8
|
+
"http",
|
|
9
|
+
"res",
|
|
10
|
+
"vary"
|
|
11
|
+
],
|
|
12
|
+
"repository": "jshttp/vary",
|
|
39
13
|
"devDependencies": {
|
|
40
14
|
"beautify-benchmark": "0.2.4",
|
|
41
15
|
"benchmark": "2.1.4",
|
|
@@ -50,26 +24,14 @@
|
|
|
50
24
|
"mocha": "2.5.3",
|
|
51
25
|
"supertest": "1.1.0"
|
|
52
26
|
},
|
|
53
|
-
"engines": {
|
|
54
|
-
"node": ">= 0.8"
|
|
55
|
-
},
|
|
56
27
|
"files": [
|
|
57
28
|
"HISTORY.md",
|
|
58
29
|
"LICENSE",
|
|
59
30
|
"README.md",
|
|
60
31
|
"index.js"
|
|
61
32
|
],
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
"http",
|
|
65
|
-
"res",
|
|
66
|
-
"vary"
|
|
67
|
-
],
|
|
68
|
-
"license": "MIT",
|
|
69
|
-
"name": "vary",
|
|
70
|
-
"repository": {
|
|
71
|
-
"type": "git",
|
|
72
|
-
"url": "git+https://github.com/jshttp/vary.git"
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">= 0.8"
|
|
73
35
|
},
|
|
74
36
|
"scripts": {
|
|
75
37
|
"bench": "node benchmark/index.js",
|
|
@@ -77,6 +39,5 @@
|
|
|
77
39
|
"test": "mocha --reporter spec --bail --check-leaks test/",
|
|
78
40
|
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
|
79
41
|
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
|
80
|
-
}
|
|
81
|
-
"version": "1.1.2"
|
|
42
|
+
}
|
|
82
43
|
}
|
package/package.json
CHANGED