node-red-contrib-web-worldmap 2.27.1 → 2.28.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 +2 -0
- package/README.md +2 -0
- package/node_modules/accepts/HISTORY.md +7 -0
- package/node_modules/accepts/README.md +3 -5
- package/node_modules/accepts/package.json +31 -34
- package/node_modules/body-parser/HISTORY.md +9 -0
- package/node_modules/body-parser/node_modules/bytes/History.md +5 -0
- package/node_modules/body-parser/node_modules/bytes/index.js +4 -0
- package/node_modules/body-parser/node_modules/bytes/package.json +11 -11
- package/node_modules/body-parser/package.json +16 -16
- package/node_modules/compressible/HISTORY.md +7 -0
- package/node_modules/compressible/package.json +26 -29
- package/node_modules/cookie/HISTORY.md +6 -0
- package/node_modules/cookie/README.md +49 -20
- package/node_modules/cookie/index.js +11 -11
- package/node_modules/cookie/package.json +18 -16
- package/node_modules/express/History.md +15 -0
- package/node_modules/express/lib/response.js +1 -1
- package/node_modules/express/lib/utils.js +2 -1
- package/node_modules/express/package.json +16 -15
- package/node_modules/mime-db/HISTORY.md +82 -0
- package/node_modules/mime-db/README.md +15 -9
- package/node_modules/mime-db/db.json +689 -52
- package/node_modules/mime-db/package.json +29 -31
- package/node_modules/mime-types/HISTORY.md +82 -2
- package/node_modules/mime-types/README.md +8 -8
- package/node_modules/mime-types/package.json +29 -31
- package/node_modules/negotiator/HISTORY.md +5 -0
- package/node_modules/negotiator/README.md +3 -3
- package/node_modules/negotiator/index.js +4 -46
- package/node_modules/negotiator/lib/language.js +3 -3
- package/node_modules/negotiator/package.json +22 -25
- package/node_modules/qs/.editorconfig +1 -0
- package/node_modules/qs/.eslintrc +6 -3
- package/node_modules/qs/CHANGELOG.md +12 -0
- package/node_modules/qs/README.md +31 -19
- package/node_modules/qs/dist/qs.js +16 -6
- package/node_modules/qs/lib/parse.js +1 -1
- package/node_modules/qs/lib/stringify.js +14 -5
- package/node_modules/qs/lib/utils.js +1 -0
- package/node_modules/qs/package.json +22 -21
- package/node_modules/qs/test/parse.js +60 -0
- package/node_modules/qs/test/stringify.js +23 -12
- package/node_modules/raw-body/HISTORY.md +5 -0
- package/node_modules/raw-body/README.md +5 -3
- package/node_modules/raw-body/node_modules/bytes/History.md +5 -0
- package/node_modules/raw-body/node_modules/bytes/index.js +4 -0
- package/node_modules/raw-body/node_modules/bytes/package.json +11 -11
- package/node_modules/raw-body/package.json +14 -14
- package/package.json +1 -1
- package/worldmap/index.html +1 -0
- package/worldmap/index3d.html +203 -194
- package/worldmap/leaflet/leaflet.antimeridian-src.js +254 -0
- package/worldmap/leaflet/sockjs.min.js +3 -3
- package/worldmap/worldmap.js +26 -10
- package/worldmap.html +23 -11
- package/worldmap.js +8 -1
- package/node_modules/qs/.eslintignore +0 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
### Change Log for Node-RED Worldmap
|
|
2
2
|
|
|
3
|
+
- v2.27.4 - Better Handling of sidc icons in geojson
|
|
4
|
+
- v2.27.3 - Try to handle greatcircles crossing antimeridian
|
|
3
5
|
- v2.27.1 - Reload existing markers for late joiners
|
|
4
6
|
- v2.26.1 - Add QTH/Maidenhead option also
|
|
5
7
|
- v2.26.0 - Add UTM and MGRS to coordinate display options.
|
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@ map web page for plotting "things" on.
|
|
|
11
11
|
|
|
12
12
|
### Updates
|
|
13
13
|
|
|
14
|
+
- v2.27.4 - Better Handling of sidc icons in geojson
|
|
15
|
+
- v2.27.3 - Try to handle greatcircles crossing antimeridian
|
|
14
16
|
- v2.27.1 - Reload existing markers for late joiners
|
|
15
17
|
- v2.26.1 - Add QTH/Maidenhead option also
|
|
16
18
|
- v2.26.0 - Add UTM and MGRS to coordinate display options.
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[![NPM Version][npm-version-image]][npm-url]
|
|
4
4
|
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
5
|
[![Node.js Version][node-version-image]][node-version-url]
|
|
6
|
-
[![Build Status][
|
|
6
|
+
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
|
|
@@ -29,8 +29,6 @@ $ npm install accepts
|
|
|
29
29
|
|
|
30
30
|
## API
|
|
31
31
|
|
|
32
|
-
<!-- eslint-disable no-unused-vars -->
|
|
33
|
-
|
|
34
32
|
```js
|
|
35
33
|
var accepts = require('accepts')
|
|
36
34
|
```
|
|
@@ -133,10 +131,10 @@ curl -I -H'Accept: text/html' http://localhost:3000/
|
|
|
133
131
|
|
|
134
132
|
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
|
|
135
133
|
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
|
|
134
|
+
[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
|
|
135
|
+
[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
|
|
136
136
|
[node-version-image]: https://badgen.net/npm/node/accepts
|
|
137
137
|
[node-version-url]: https://nodejs.org/en/download
|
|
138
138
|
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
|
|
139
139
|
[npm-url]: https://npmjs.org/package/accepts
|
|
140
140
|
[npm-version-image]: https://badgen.net/npm/v/accepts
|
|
141
|
-
[travis-image]: https://badgen.net/travis/jshttp/accepts/master
|
|
142
|
-
[travis-url]: https://travis-ci.org/jshttp/accepts
|
|
@@ -1,36 +1,32 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"accepts@1.3.7",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "accepts@1.3.7",
|
|
9
|
-
"_id": "accepts@1.3.7",
|
|
2
|
+
"_from": "accepts@~1.3.5",
|
|
3
|
+
"_id": "accepts@1.3.8",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
12
|
-
"_location": "/accepts",
|
|
5
|
+
"_integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==",
|
|
6
|
+
"_location": "/node-red-contrib-web-worldmap/accepts",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
15
|
-
"type": "
|
|
9
|
+
"type": "range",
|
|
16
10
|
"registry": true,
|
|
17
|
-
"raw": "accepts
|
|
11
|
+
"raw": "accepts@~1.3.5",
|
|
18
12
|
"name": "accepts",
|
|
19
13
|
"escapedName": "accepts",
|
|
20
|
-
"rawSpec": "1.3.
|
|
14
|
+
"rawSpec": "~1.3.5",
|
|
21
15
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "1.3.
|
|
16
|
+
"fetchSpec": "~1.3.5"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
25
|
-
"/compression",
|
|
26
|
-
"/express"
|
|
19
|
+
"/node-red-contrib-web-worldmap/compression",
|
|
20
|
+
"/node-red-contrib-web-worldmap/express"
|
|
27
21
|
],
|
|
28
|
-
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.
|
|
29
|
-
"
|
|
30
|
-
"
|
|
22
|
+
"_resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz",
|
|
23
|
+
"_shasum": "0bf0be125b67014adcb0b0921e62db7bffe16b2e",
|
|
24
|
+
"_spec": "accepts@~1.3.5",
|
|
25
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/compression",
|
|
31
26
|
"bugs": {
|
|
32
27
|
"url": "https://github.com/jshttp/accepts/issues"
|
|
33
28
|
},
|
|
29
|
+
"bundleDependencies": false,
|
|
34
30
|
"contributors": [
|
|
35
31
|
{
|
|
36
32
|
"name": "Douglas Christopher Wilson",
|
|
@@ -43,21 +39,22 @@
|
|
|
43
39
|
}
|
|
44
40
|
],
|
|
45
41
|
"dependencies": {
|
|
46
|
-
"mime-types": "~2.1.
|
|
47
|
-
"negotiator": "0.6.
|
|
42
|
+
"mime-types": "~2.1.34",
|
|
43
|
+
"negotiator": "0.6.3"
|
|
48
44
|
},
|
|
45
|
+
"deprecated": false,
|
|
49
46
|
"description": "Higher-level content negotiation",
|
|
50
47
|
"devDependencies": {
|
|
51
48
|
"deep-equal": "1.0.1",
|
|
52
|
-
"eslint": "
|
|
53
|
-
"eslint-config-standard": "
|
|
54
|
-
"eslint-plugin-import": "2.
|
|
55
|
-
"eslint-plugin-markdown": "
|
|
56
|
-
"eslint-plugin-node": "
|
|
57
|
-
"eslint-plugin-promise": "4.
|
|
58
|
-
"eslint-plugin-standard": "4.
|
|
59
|
-
"mocha": "
|
|
60
|
-
"nyc": "
|
|
49
|
+
"eslint": "7.32.0",
|
|
50
|
+
"eslint-config-standard": "14.1.1",
|
|
51
|
+
"eslint-plugin-import": "2.25.4",
|
|
52
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
53
|
+
"eslint-plugin-node": "11.1.0",
|
|
54
|
+
"eslint-plugin-promise": "4.3.1",
|
|
55
|
+
"eslint-plugin-standard": "4.1.0",
|
|
56
|
+
"mocha": "9.2.0",
|
|
57
|
+
"nyc": "15.1.0"
|
|
61
58
|
},
|
|
62
59
|
"engines": {
|
|
63
60
|
"node": ">= 0.6"
|
|
@@ -81,10 +78,10 @@
|
|
|
81
78
|
"url": "git+https://github.com/jshttp/accepts.git"
|
|
82
79
|
},
|
|
83
80
|
"scripts": {
|
|
84
|
-
"lint": "eslint
|
|
81
|
+
"lint": "eslint .",
|
|
85
82
|
"test": "mocha --reporter spec --check-leaks --bail test/",
|
|
86
|
-
"test-
|
|
87
|
-
"test-
|
|
83
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
84
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
88
85
|
},
|
|
89
|
-
"version": "1.3.
|
|
86
|
+
"version": "1.3.8"
|
|
90
87
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_from": "bytes@3.1.
|
|
3
|
-
"_id": "bytes@3.1.
|
|
2
|
+
"_from": "bytes@3.1.2",
|
|
3
|
+
"_id": "bytes@3.1.2",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512
|
|
5
|
+
"_integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==",
|
|
6
6
|
"_location": "/node-red-contrib-web-worldmap/body-parser/bytes",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
9
9
|
"type": "version",
|
|
10
10
|
"registry": true,
|
|
11
|
-
"raw": "bytes@3.1.
|
|
11
|
+
"raw": "bytes@3.1.2",
|
|
12
12
|
"name": "bytes",
|
|
13
13
|
"escapedName": "bytes",
|
|
14
|
-
"rawSpec": "3.1.
|
|
14
|
+
"rawSpec": "3.1.2",
|
|
15
15
|
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "3.1.
|
|
16
|
+
"fetchSpec": "3.1.2"
|
|
17
17
|
},
|
|
18
18
|
"_requiredBy": [
|
|
19
19
|
"/node-red-contrib-web-worldmap/body-parser"
|
|
20
20
|
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.
|
|
22
|
-
"_shasum": "
|
|
23
|
-
"_spec": "bytes@3.1.
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz",
|
|
22
|
+
"_shasum": "8b0beeb98605adf1b128fa4386403c009e0221a5",
|
|
23
|
+
"_spec": "bytes@3.1.2",
|
|
24
24
|
"_where": "/Users/conway/Projects/worldmap/node_modules/body-parser",
|
|
25
25
|
"author": {
|
|
26
26
|
"name": "TJ Holowaychuk",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"eslint": "7.32.0",
|
|
48
48
|
"eslint-plugin-markdown": "2.2.1",
|
|
49
|
-
"mocha": "9.
|
|
49
|
+
"mocha": "9.2.0",
|
|
50
50
|
"nyc": "15.1.0"
|
|
51
51
|
},
|
|
52
52
|
"engines": {
|
|
@@ -80,5 +80,5 @@
|
|
|
80
80
|
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
81
81
|
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
82
82
|
},
|
|
83
|
-
"version": "3.1.
|
|
83
|
+
"version": "3.1.2"
|
|
84
84
|
}
|
|
@@ -1,26 +1,26 @@
|
|
|
1
1
|
{
|
|
2
|
-
"_from": "body-parser@1.19.
|
|
3
|
-
"_id": "body-parser@1.19.
|
|
2
|
+
"_from": "body-parser@1.19.2",
|
|
3
|
+
"_id": "body-parser@1.19.2",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-SAAwOxgoCKMGs9uUAUFHygfLAyaniaoun6I8mFY9pRAJL9+Kec34aU+oIjDhTycub1jozEfEwx1W1IuOYxVSFw==",
|
|
6
6
|
"_location": "/node-red-contrib-web-worldmap/body-parser",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
9
9
|
"type": "version",
|
|
10
10
|
"registry": true,
|
|
11
|
-
"raw": "body-parser@1.19.
|
|
11
|
+
"raw": "body-parser@1.19.2",
|
|
12
12
|
"name": "body-parser",
|
|
13
13
|
"escapedName": "body-parser",
|
|
14
|
-
"rawSpec": "1.19.
|
|
14
|
+
"rawSpec": "1.19.2",
|
|
15
15
|
"saveSpec": null,
|
|
16
|
-
"fetchSpec": "1.19.
|
|
16
|
+
"fetchSpec": "1.19.2"
|
|
17
17
|
},
|
|
18
18
|
"_requiredBy": [
|
|
19
19
|
"/node-red-contrib-web-worldmap/express"
|
|
20
20
|
],
|
|
21
|
-
"_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.
|
|
22
|
-
"_shasum": "
|
|
23
|
-
"_spec": "body-parser@1.19.
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.19.2.tgz",
|
|
22
|
+
"_shasum": "4714ccd9c157d44797b8b5607d72c0b89952f26e",
|
|
23
|
+
"_spec": "body-parser@1.19.2",
|
|
24
24
|
"_where": "/Users/conway/Projects/worldmap/node_modules/express",
|
|
25
25
|
"bugs": {
|
|
26
26
|
"url": "https://github.com/expressjs/body-parser/issues"
|
|
@@ -38,15 +38,15 @@
|
|
|
38
38
|
}
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"bytes": "3.1.
|
|
41
|
+
"bytes": "3.1.2",
|
|
42
42
|
"content-type": "~1.0.4",
|
|
43
43
|
"debug": "2.6.9",
|
|
44
44
|
"depd": "~1.1.2",
|
|
45
45
|
"http-errors": "1.8.1",
|
|
46
46
|
"iconv-lite": "0.4.24",
|
|
47
47
|
"on-finished": "~2.3.0",
|
|
48
|
-
"qs": "6.9.
|
|
49
|
-
"raw-body": "2.4.
|
|
48
|
+
"qs": "6.9.7",
|
|
49
|
+
"raw-body": "2.4.3",
|
|
50
50
|
"type-is": "~1.6.18"
|
|
51
51
|
},
|
|
52
52
|
"deprecated": false,
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"eslint": "7.32.0",
|
|
56
56
|
"eslint-config-standard": "14.1.1",
|
|
57
|
-
"eslint-plugin-import": "2.25.
|
|
57
|
+
"eslint-plugin-import": "2.25.4",
|
|
58
58
|
"eslint-plugin-markdown": "2.2.1",
|
|
59
59
|
"eslint-plugin-node": "11.1.0",
|
|
60
60
|
"eslint-plugin-promise": "5.2.0",
|
|
61
61
|
"eslint-plugin-standard": "4.1.0",
|
|
62
62
|
"methods": "1.1.2",
|
|
63
|
-
"mocha": "9.
|
|
63
|
+
"mocha": "9.2.0",
|
|
64
64
|
"nyc": "15.1.0",
|
|
65
65
|
"safe-buffer": "5.2.1",
|
|
66
|
-
"supertest": "6.
|
|
66
|
+
"supertest": "6.2.2"
|
|
67
67
|
},
|
|
68
68
|
"engines": {
|
|
69
69
|
"node": ">= 0.8"
|
|
@@ -87,5 +87,5 @@
|
|
|
87
87
|
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
88
88
|
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
89
89
|
},
|
|
90
|
-
"version": "1.19.
|
|
90
|
+
"version": "1.19.2"
|
|
91
91
|
}
|
|
@@ -1,35 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
"
|
|
3
|
-
|
|
4
|
-
"compressible@2.0.17",
|
|
5
|
-
"/Users/conway/Projects/worldmap"
|
|
6
|
-
]
|
|
7
|
-
],
|
|
8
|
-
"_from": "compressible@2.0.17",
|
|
9
|
-
"_id": "compressible@2.0.17",
|
|
2
|
+
"_from": "compressible@~2.0.16",
|
|
3
|
+
"_id": "compressible@2.0.18",
|
|
10
4
|
"_inBundle": false,
|
|
11
|
-
"_integrity": "sha512-
|
|
12
|
-
"_location": "/compressible",
|
|
5
|
+
"_integrity": "sha512-AF3r7P5dWxL8MxyITRMlORQNaOA2IkAFaTr4k7BUumjPtRpGDTZpl0Pb1XCO6JeDCBdp126Cgs9sMxqSjgYyRg==",
|
|
6
|
+
"_location": "/node-red-contrib-web-worldmap/compressible",
|
|
13
7
|
"_phantomChildren": {},
|
|
14
8
|
"_requested": {
|
|
15
|
-
"type": "
|
|
9
|
+
"type": "range",
|
|
16
10
|
"registry": true,
|
|
17
|
-
"raw": "compressible
|
|
11
|
+
"raw": "compressible@~2.0.16",
|
|
18
12
|
"name": "compressible",
|
|
19
13
|
"escapedName": "compressible",
|
|
20
|
-
"rawSpec": "2.0.
|
|
14
|
+
"rawSpec": "~2.0.16",
|
|
21
15
|
"saveSpec": null,
|
|
22
|
-
"fetchSpec": "2.0.
|
|
16
|
+
"fetchSpec": "~2.0.16"
|
|
23
17
|
},
|
|
24
18
|
"_requiredBy": [
|
|
25
|
-
"/compression"
|
|
19
|
+
"/node-red-contrib-web-worldmap/compression"
|
|
26
20
|
],
|
|
27
|
-
"_resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.
|
|
28
|
-
"
|
|
29
|
-
"
|
|
21
|
+
"_resolved": "https://registry.npmjs.org/compressible/-/compressible-2.0.18.tgz",
|
|
22
|
+
"_shasum": "af53cca6b070d4c3c0750fbd77286a6d7cc46fba",
|
|
23
|
+
"_spec": "compressible@~2.0.16",
|
|
24
|
+
"_where": "/Users/conway/Projects/worldmap/node_modules/compression",
|
|
30
25
|
"bugs": {
|
|
31
26
|
"url": "https://github.com/jshttp/compressible/issues"
|
|
32
27
|
},
|
|
28
|
+
"bundleDependencies": false,
|
|
33
29
|
"contributors": [
|
|
34
30
|
{
|
|
35
31
|
"name": "Douglas Christopher Wilson",
|
|
@@ -47,19 +43,20 @@
|
|
|
47
43
|
}
|
|
48
44
|
],
|
|
49
45
|
"dependencies": {
|
|
50
|
-
"mime-db": ">= 1.
|
|
46
|
+
"mime-db": ">= 1.43.0 < 2"
|
|
51
47
|
},
|
|
48
|
+
"deprecated": false,
|
|
52
49
|
"description": "Compressible Content-Type / mime checking",
|
|
53
50
|
"devDependencies": {
|
|
54
|
-
"eslint": "
|
|
55
|
-
"eslint-config-standard": "
|
|
56
|
-
"eslint-plugin-import": "2.
|
|
57
|
-
"eslint-plugin-markdown": "1.0.
|
|
58
|
-
"eslint-plugin-node": "
|
|
59
|
-
"eslint-plugin-promise": "4.
|
|
60
|
-
"eslint-plugin-standard": "4.0.
|
|
61
|
-
"mocha": "
|
|
62
|
-
"nyc": "
|
|
51
|
+
"eslint": "6.8.0",
|
|
52
|
+
"eslint-config-standard": "14.1.0",
|
|
53
|
+
"eslint-plugin-import": "2.19.1",
|
|
54
|
+
"eslint-plugin-markdown": "1.0.1",
|
|
55
|
+
"eslint-plugin-node": "11.0.0",
|
|
56
|
+
"eslint-plugin-promise": "4.2.1",
|
|
57
|
+
"eslint-plugin-standard": "4.0.1",
|
|
58
|
+
"mocha": "7.0.0",
|
|
59
|
+
"nyc": "15.0.0"
|
|
63
60
|
},
|
|
64
61
|
"engines": {
|
|
65
62
|
"node": ">= 0.6"
|
|
@@ -90,5 +87,5 @@
|
|
|
90
87
|
"test-travis": "nyc --reporter=text npm test",
|
|
91
88
|
"version": "node scripts/version-history.js && git add HISTORY.md"
|
|
92
89
|
},
|
|
93
|
-
"version": "2.0.
|
|
90
|
+
"version": "2.0.18"
|
|
94
91
|
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[![NPM Version][npm-version-image]][npm-url]
|
|
4
4
|
[![NPM Downloads][npm-downloads-image]][npm-url]
|
|
5
5
|
[![Node.js Version][node-version-image]][node-version-url]
|
|
6
|
-
[![Build Status][
|
|
6
|
+
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
|
|
7
7
|
[![Test Coverage][coveralls-image]][coveralls-url]
|
|
8
8
|
|
|
9
9
|
Basic HTTP cookie parser and serializer for HTTP servers.
|
|
@@ -198,32 +198,61 @@ $ npm test
|
|
|
198
198
|
```
|
|
199
199
|
$ npm run bench
|
|
200
200
|
|
|
201
|
-
> cookie@0.
|
|
201
|
+
> cookie@0.4.1 bench
|
|
202
202
|
> node benchmark/index.js
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
uv@1.16.1
|
|
204
|
+
node@16.13.1
|
|
205
|
+
v8@9.4.146.24-node.14
|
|
206
|
+
uv@1.42.0
|
|
208
207
|
zlib@1.2.11
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
modules@
|
|
212
|
-
|
|
213
|
-
|
|
208
|
+
brotli@1.0.9
|
|
209
|
+
ares@1.18.1
|
|
210
|
+
modules@93
|
|
211
|
+
nghttp2@1.45.1
|
|
212
|
+
napi@8
|
|
213
|
+
llhttp@6.0.4
|
|
214
|
+
openssl@1.1.1l+quic
|
|
215
|
+
cldr@39.0
|
|
216
|
+
icu@69.1
|
|
217
|
+
tz@2021a
|
|
218
|
+
unicode@13.0
|
|
219
|
+
ngtcp2@0.1.0-DEV
|
|
220
|
+
nghttp3@0.1.0-DEV
|
|
221
|
+
|
|
222
|
+
> node benchmark/parse-top.js
|
|
223
|
+
|
|
224
|
+
cookie.parse - top sites
|
|
225
|
+
|
|
226
|
+
15 tests completed.
|
|
227
|
+
|
|
228
|
+
parse accounts.google.com x 504,358 ops/sec ±6.55% (171 runs sampled)
|
|
229
|
+
parse apple.com x 1,369,991 ops/sec ±0.84% (189 runs sampled)
|
|
230
|
+
parse cloudflare.com x 360,669 ops/sec ±3.75% (182 runs sampled)
|
|
231
|
+
parse docs.google.com x 521,496 ops/sec ±4.90% (180 runs sampled)
|
|
232
|
+
parse drive.google.com x 553,514 ops/sec ±0.59% (189 runs sampled)
|
|
233
|
+
parse en.wikipedia.org x 286,052 ops/sec ±0.62% (188 runs sampled)
|
|
234
|
+
parse linkedin.com x 178,817 ops/sec ±0.61% (192 runs sampled)
|
|
235
|
+
parse maps.google.com x 284,585 ops/sec ±0.68% (188 runs sampled)
|
|
236
|
+
parse microsoft.com x 161,230 ops/sec ±0.56% (192 runs sampled)
|
|
237
|
+
parse play.google.com x 352,144 ops/sec ±1.01% (181 runs sampled)
|
|
238
|
+
parse plus.google.com x 275,204 ops/sec ±7.78% (156 runs sampled)
|
|
239
|
+
parse support.google.com x 339,493 ops/sec ±1.02% (191 runs sampled)
|
|
240
|
+
parse www.google.com x 286,110 ops/sec ±0.90% (191 runs sampled)
|
|
241
|
+
parse youtu.be x 548,557 ops/sec ±0.60% (184 runs sampled)
|
|
242
|
+
parse youtube.com x 545,293 ops/sec ±0.65% (191 runs sampled)
|
|
214
243
|
|
|
215
244
|
> node benchmark/parse.js
|
|
216
245
|
|
|
217
|
-
cookie.parse
|
|
246
|
+
cookie.parse - generic
|
|
218
247
|
|
|
219
248
|
6 tests completed.
|
|
220
249
|
|
|
221
|
-
simple x 1,
|
|
222
|
-
decode x
|
|
223
|
-
unquote x
|
|
224
|
-
duplicates x
|
|
225
|
-
10 cookies x
|
|
226
|
-
100 cookies x 14,
|
|
250
|
+
simple x 1,266,646 ops/sec ±0.65% (191 runs sampled)
|
|
251
|
+
decode x 838,413 ops/sec ±0.60% (191 runs sampled)
|
|
252
|
+
unquote x 877,820 ops/sec ±0.72% (189 runs sampled)
|
|
253
|
+
duplicates x 516,680 ops/sec ±0.61% (191 runs sampled)
|
|
254
|
+
10 cookies x 156,874 ops/sec ±0.52% (189 runs sampled)
|
|
255
|
+
100 cookies x 14,663 ops/sec ±0.53% (191 runs sampled)
|
|
227
256
|
```
|
|
228
257
|
|
|
229
258
|
## References
|
|
@@ -248,10 +277,10 @@ $ npm run bench
|
|
|
248
277
|
|
|
249
278
|
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/cookie/master
|
|
250
279
|
[coveralls-url]: https://coveralls.io/r/jshttp/cookie?branch=master
|
|
280
|
+
[github-actions-ci-image]: https://img.shields.io/github/workflow/status/jshttp/cookie/ci/master?label=ci
|
|
281
|
+
[github-actions-ci-url]: https://github.com/jshttp/cookie/actions/workflows/ci.yml
|
|
251
282
|
[node-version-image]: https://badgen.net/npm/node/cookie
|
|
252
283
|
[node-version-url]: https://nodejs.org/en/download
|
|
253
284
|
[npm-downloads-image]: https://badgen.net/npm/dm/cookie
|
|
254
285
|
[npm-url]: https://npmjs.org/package/cookie
|
|
255
286
|
[npm-version-image]: https://badgen.net/npm/v/cookie
|
|
256
|
-
[travis-image]: https://badgen.net/travis/jshttp/cookie/master
|
|
257
|
-
[travis-url]: https://travis-ci.org/jshttp/cookie
|
|
@@ -22,7 +22,6 @@ exports.serialize = serialize;
|
|
|
22
22
|
|
|
23
23
|
var decode = decodeURIComponent;
|
|
24
24
|
var encode = encodeURIComponent;
|
|
25
|
-
var pairSplitRegExp = /; */;
|
|
26
25
|
|
|
27
26
|
/**
|
|
28
27
|
* RegExp to match field-content in RFC 7230 sec 3.2
|
|
@@ -53,28 +52,29 @@ function parse(str, options) {
|
|
|
53
52
|
|
|
54
53
|
var obj = {}
|
|
55
54
|
var opt = options || {};
|
|
56
|
-
var pairs = str.split(
|
|
55
|
+
var pairs = str.split(';')
|
|
57
56
|
var dec = opt.decode || decode;
|
|
58
57
|
|
|
59
58
|
for (var i = 0; i < pairs.length; i++) {
|
|
60
59
|
var pair = pairs[i];
|
|
61
|
-
var
|
|
60
|
+
var index = pair.indexOf('=')
|
|
62
61
|
|
|
63
62
|
// skip things that don't look like key=value
|
|
64
|
-
if (
|
|
63
|
+
if (index < 0) {
|
|
65
64
|
continue;
|
|
66
65
|
}
|
|
67
66
|
|
|
68
|
-
var key = pair.
|
|
69
|
-
var val = pair.substr(++eq_idx, pair.length).trim();
|
|
70
|
-
|
|
71
|
-
// quoted values
|
|
72
|
-
if ('"' == val[0]) {
|
|
73
|
-
val = val.slice(1, -1);
|
|
74
|
-
}
|
|
67
|
+
var key = pair.substring(0, index).trim()
|
|
75
68
|
|
|
76
69
|
// only assign once
|
|
77
70
|
if (undefined == obj[key]) {
|
|
71
|
+
var val = pair.substring(index + 1, pair.length).trim()
|
|
72
|
+
|
|
73
|
+
// quoted values
|
|
74
|
+
if (val[0] === '"') {
|
|
75
|
+
val = val.slice(1, -1)
|
|
76
|
+
}
|
|
77
|
+
|
|
78
78
|
obj[key] = tryDecode(val, dec);
|
|
79
79
|
}
|
|
80
80
|
}
|