node-red-contrib-web-worldmap 2.32.2 → 2.33.0
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 +3 -1
- package/README.md +2 -0
- package/node_modules/@turf/bezier-spline/package.json +39 -70
- package/node_modules/@turf/helpers/package.json +38 -82
- package/node_modules/@turf/invariant/package.json +36 -73
- package/node_modules/accepts/package.json +15 -55
- package/node_modules/array-flatten/package.json +22 -47
- 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/call-bind/package.json +78 -106
- package/node_modules/cgi/package.json +10 -46
- package/node_modules/compressible/package.json +15 -58
- package/node_modules/compression/package.json +10 -52
- package/node_modules/content-disposition/node_modules/safe-buffer/package.json +18 -43
- package/node_modules/content-disposition/package.json +14 -49
- package/node_modules/content-type/package.json +15 -54
- package/node_modules/cookie/package.json +14 -52
- package/node_modules/cookie-signature/package.json +8 -47
- package/node_modules/debug/package.json +21 -68
- package/node_modules/depd/package.json +13 -51
- package/node_modules/destroy/package.json +15 -50
- package/node_modules/ee-first/package.json +9 -43
- package/node_modules/encodeurl/package.json +14 -52
- package/node_modules/escape-html/package.json +12 -47
- package/node_modules/etag/package.json +15 -54
- 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/node_modules/safe-buffer/package.json +18 -43
- package/node_modules/express/package.json +33 -88
- package/node_modules/extend/package.json +42 -78
- package/node_modules/faye-websocket/package.json +33 -64
- package/node_modules/finalhandler/package.json +9 -44
- package/node_modules/forwarded/package.json +14 -49
- package/node_modules/fresh/package.json +17 -61
- package/node_modules/function-bind/package.json +23 -56
- package/node_modules/get-intrinsic/package.json +89 -118
- package/node_modules/has/package.json +21 -46
- package/node_modules/has-symbols/package.json +99 -124
- package/node_modules/header-stack/package.json +14 -48
- package/node_modules/http-errors/package.json +18 -63
- 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/iconv-lite/package.json +43 -77
- package/node_modules/inherits/package.json +12 -44
- package/node_modules/ipaddr.js/package.json +13 -48
- package/node_modules/media-typer/package.json +8 -43
- package/node_modules/merge-descriptors/package.json +10 -47
- package/node_modules/methods/package.json +17 -60
- package/node_modules/mime/package.json +13 -45
- 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/object-inspect/package.json +48 -76
- package/node_modules/on-finished/package.json +8 -50
- package/node_modules/on-headers/package.json +14 -52
- package/node_modules/parseurl/package.json +10 -54
- package/node_modules/path-to-regexp/package.json +15 -44
- package/node_modules/proxy-addr/package.json +14 -49
- 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/range-parser/package.json +18 -68
- package/node_modules/raw-body/node_modules/bytes/package.json +20 -62
- package/node_modules/raw-body/package.json +9 -51
- package/node_modules/safe-buffer/package.json +5 -36
- package/node_modules/safer-buffer/package.json +13 -42
- package/node_modules/send/node_modules/ms/package.json +20 -52
- package/node_modules/send/package.json +17 -62
- package/node_modules/serve-static/package.json +9 -44
- package/node_modules/setprototypeof/package.json +27 -55
- package/node_modules/side-channel/package.json +65 -93
- package/node_modules/sockjs/package.json +43 -70
- package/node_modules/statuses/package.json +19 -61
- package/node_modules/stream-stack/package.json +11 -43
- package/node_modules/toidentifier/package.json +9 -51
- package/node_modules/type-is/package.json +12 -55
- package/node_modules/unpipe/package.json +8 -45
- package/node_modules/utils-merge/package.json +19 -45
- package/node_modules/uuid/package.json +70 -99
- package/node_modules/vary/package.json +13 -52
- package/node_modules/websocket-driver/package.json +33 -68
- package/node_modules/websocket-extensions/package.json +27 -61
- package/package.json +1 -1
- package/worldmap/worldmap.js +14 -8
- package/worldmap.html +0 -1
- 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,94 +1,44 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "range-parser@1.2.1",
|
|
9
|
-
"_id": "range-parser@1.2.1",
|
|
10
|
-
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==",
|
|
12
|
-
"_location": "/range-parser",
|
|
13
|
-
"_phantomChildren": {},
|
|
14
|
-
"_requested": {
|
|
15
|
-
"type": "version",
|
|
16
|
-
"registry": true,
|
|
17
|
-
"raw": "range-parser@1.2.1",
|
|
18
|
-
"name": "range-parser",
|
|
19
|
-
"escapedName": "range-parser",
|
|
20
|
-
"rawSpec": "1.2.1",
|
|
21
|
-
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "1.2.1"
|
|
23
|
-
},
|
|
24
|
-
"_requiredBy": [
|
|
25
|
-
"/express",
|
|
26
|
-
"/send"
|
|
27
|
-
],
|
|
28
|
-
"_resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz",
|
|
29
|
-
"_spec": "1.2.1",
|
|
30
|
-
"_where": "/Users/conway/Projects/worldmap",
|
|
31
|
-
"author": {
|
|
32
|
-
"name": "TJ Holowaychuk",
|
|
33
|
-
"email": "tj@vision-media.ca",
|
|
34
|
-
"url": "http://tjholowaychuk.com"
|
|
35
|
-
},
|
|
36
|
-
"bugs": {
|
|
37
|
-
"url": "https://github.com/jshttp/range-parser/issues"
|
|
38
|
-
},
|
|
2
|
+
"name": "range-parser",
|
|
3
|
+
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
|
|
4
|
+
"description": "Range header field string parser",
|
|
5
|
+
"version": "1.2.1",
|
|
39
6
|
"contributors": [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
"name": "James Wyatt Cready",
|
|
46
|
-
"email": "wyatt.cready@lanetix.com"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"name": "Jonathan Ong",
|
|
50
|
-
"email": "me@jongleberry.com",
|
|
51
|
-
"url": "http://jongleberry.com"
|
|
52
|
-
}
|
|
7
|
+
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
8
|
+
"James Wyatt Cready <wyatt.cready@lanetix.com>",
|
|
9
|
+
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
|
53
10
|
],
|
|
54
|
-
"
|
|
11
|
+
"license": "MIT",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"range",
|
|
14
|
+
"parser",
|
|
15
|
+
"http"
|
|
16
|
+
],
|
|
17
|
+
"repository": "jshttp/range-parser",
|
|
55
18
|
"devDependencies": {
|
|
56
19
|
"deep-equal": "1.0.1",
|
|
57
20
|
"eslint": "5.16.0",
|
|
58
21
|
"eslint-config-standard": "12.0.0",
|
|
59
|
-
"eslint-plugin-import": "2.17.2",
|
|
60
22
|
"eslint-plugin-markdown": "1.0.0",
|
|
23
|
+
"eslint-plugin-import": "2.17.2",
|
|
61
24
|
"eslint-plugin-node": "8.0.1",
|
|
62
25
|
"eslint-plugin-promise": "4.1.1",
|
|
63
26
|
"eslint-plugin-standard": "4.0.0",
|
|
64
27
|
"mocha": "6.1.4",
|
|
65
28
|
"nyc": "14.1.1"
|
|
66
29
|
},
|
|
67
|
-
"engines": {
|
|
68
|
-
"node": ">= 0.6"
|
|
69
|
-
},
|
|
70
30
|
"files": [
|
|
71
31
|
"HISTORY.md",
|
|
72
32
|
"LICENSE",
|
|
73
33
|
"index.js"
|
|
74
34
|
],
|
|
75
|
-
"
|
|
76
|
-
|
|
77
|
-
"range",
|
|
78
|
-
"parser",
|
|
79
|
-
"http"
|
|
80
|
-
],
|
|
81
|
-
"license": "MIT",
|
|
82
|
-
"name": "range-parser",
|
|
83
|
-
"repository": {
|
|
84
|
-
"type": "git",
|
|
85
|
-
"url": "git+https://github.com/jshttp/range-parser.git"
|
|
35
|
+
"engines": {
|
|
36
|
+
"node": ">= 0.6"
|
|
86
37
|
},
|
|
87
38
|
"scripts": {
|
|
88
39
|
"lint": "eslint --plugin markdown --ext js,md .",
|
|
89
40
|
"test": "mocha --reporter spec",
|
|
90
41
|
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
91
42
|
"test-travis": "nyc --reporter=text npm test"
|
|
92
|
-
}
|
|
93
|
-
"version": "1.2.1"
|
|
43
|
+
}
|
|
94
44
|
}
|
|
@@ -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,54 +1,20 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
"_location": "/raw-body",
|
|
7
|
-
"_phantomChildren": {},
|
|
8
|
-
"_requested": {
|
|
9
|
-
"type": "version",
|
|
10
|
-
"registry": true,
|
|
11
|
-
"raw": "raw-body@2.5.1",
|
|
12
|
-
"name": "raw-body",
|
|
13
|
-
"escapedName": "raw-body",
|
|
14
|
-
"rawSpec": "2.5.1",
|
|
15
|
-
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "2.5.1"
|
|
17
|
-
},
|
|
18
|
-
"_requiredBy": [
|
|
19
|
-
"/body-parser"
|
|
20
|
-
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz",
|
|
22
|
-
"_shasum": "fe1b1628b181b700215e5fd42389f98b71392857",
|
|
23
|
-
"_spec": "raw-body@2.5.1",
|
|
24
|
-
"_where": "/Users/conway/Projects/worldmap/node_modules/body-parser",
|
|
25
|
-
"author": {
|
|
26
|
-
"name": "Jonathan Ong",
|
|
27
|
-
"email": "me@jongleberry.com",
|
|
28
|
-
"url": "http://jongleberry.com"
|
|
29
|
-
},
|
|
30
|
-
"bugs": {
|
|
31
|
-
"url": "https://github.com/stream-utils/raw-body/issues"
|
|
32
|
-
},
|
|
33
|
-
"bundleDependencies": false,
|
|
2
|
+
"name": "raw-body",
|
|
3
|
+
"description": "Get and validate the raw body of a readable stream.",
|
|
4
|
+
"version": "2.5.1",
|
|
5
|
+
"author": "Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
|
34
6
|
"contributors": [
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
"email": "doug@somethingdoug.com"
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
"name": "Raynos",
|
|
41
|
-
"email": "raynos2@gmail.com"
|
|
42
|
-
}
|
|
7
|
+
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
8
|
+
"Raynos <raynos2@gmail.com>"
|
|
43
9
|
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"repository": "stream-utils/raw-body",
|
|
44
12
|
"dependencies": {
|
|
45
13
|
"bytes": "3.1.2",
|
|
46
14
|
"http-errors": "2.0.0",
|
|
47
15
|
"iconv-lite": "0.4.24",
|
|
48
16
|
"unpipe": "1.0.0"
|
|
49
17
|
},
|
|
50
|
-
"deprecated": false,
|
|
51
|
-
"description": "Get and validate the raw body of a readable stream.",
|
|
52
18
|
"devDependencies": {
|
|
53
19
|
"bluebird": "3.7.2",
|
|
54
20
|
"eslint": "7.32.0",
|
|
@@ -74,18 +40,10 @@
|
|
|
74
40
|
"index.d.ts",
|
|
75
41
|
"index.js"
|
|
76
42
|
],
|
|
77
|
-
"homepage": "https://github.com/stream-utils/raw-body#readme",
|
|
78
|
-
"license": "MIT",
|
|
79
|
-
"name": "raw-body",
|
|
80
|
-
"repository": {
|
|
81
|
-
"type": "git",
|
|
82
|
-
"url": "git+https://github.com/stream-utils/raw-body.git"
|
|
83
|
-
},
|
|
84
43
|
"scripts": {
|
|
85
44
|
"lint": "eslint .",
|
|
86
45
|
"test": "mocha --trace-deprecation --reporter spec --bail --check-leaks test/",
|
|
87
46
|
"test-ci": "nyc --reporter=lcovonly --reporter=text npm test",
|
|
88
47
|
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
89
|
-
}
|
|
90
|
-
"version": "2.5.1"
|
|
48
|
+
}
|
|
91
49
|
}
|