node-red-contrib-web-worldmap 4.9.0 → 5.0.1
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 +7 -3
- package/examples/{feedback.json → Feedback.json} +1 -9
- package/examples/MouseCoordinates.json +159 -0
- package/examples/sidcEdgeIcon.json +158 -0
- package/node_modules/@turf/bezier-spline/README.md +15 -21
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs +165 -0
- package/node_modules/@turf/bezier-spline/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/bezier-spline/dist/{es/index.js → cjs/index.d.cts} +9 -30
- package/node_modules/@turf/bezier-spline/dist/{js → esm}/index.d.ts +5 -3
- package/node_modules/@turf/bezier-spline/dist/esm/index.js +165 -0
- package/node_modules/@turf/bezier-spline/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/bezier-spline/package.json +33 -25
- package/node_modules/@turf/helpers/README.md +231 -219
- package/node_modules/@turf/helpers/dist/cjs/index.cjs +308 -0
- package/node_modules/@turf/helpers/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/helpers/dist/{es/index.js → cjs/index.d.cts} +103 -303
- package/node_modules/@turf/helpers/dist/{js → esm}/index.d.ts +67 -53
- package/node_modules/@turf/helpers/dist/esm/index.js +308 -0
- package/node_modules/@turf/helpers/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/helpers/package.json +32 -22
- package/node_modules/@turf/invariant/README.md +47 -58
- package/node_modules/@turf/invariant/dist/cjs/index.cjs +127 -0
- package/node_modules/@turf/invariant/dist/cjs/index.cjs.map +1 -0
- package/node_modules/@turf/invariant/dist/cjs/index.d.cts +108 -0
- package/node_modules/@turf/invariant/dist/{js → esm}/index.d.ts +12 -9
- package/node_modules/@turf/invariant/dist/esm/index.js +127 -0
- package/node_modules/@turf/invariant/dist/esm/index.js.map +1 -0
- package/node_modules/@turf/invariant/package.json +31 -22
- package/node_modules/@types/geojson/LICENSE +21 -0
- package/node_modules/@types/geojson/README.md +15 -0
- package/node_modules/@types/geojson/index.d.ts +165 -0
- package/node_modules/@types/geojson/package.json +45 -0
- package/node_modules/body-parser/HISTORY.md +7 -0
- package/node_modules/body-parser/README.md +11 -0
- package/node_modules/body-parser/lib/types/urlencoded.js +30 -7
- package/node_modules/body-parser/package.json +2 -2
- package/node_modules/encodeurl/README.md +19 -38
- package/node_modules/encodeurl/index.js +1 -1
- package/node_modules/encodeurl/package.json +7 -7
- package/node_modules/express/History.md +27 -0
- package/node_modules/express/Readme.md +100 -6
- package/node_modules/express/lib/response.js +11 -10
- package/node_modules/express/package.json +11 -11
- package/node_modules/finalhandler/HISTORY.md +15 -0
- package/node_modules/finalhandler/README.md +2 -2
- package/node_modules/finalhandler/index.js +7 -2
- package/node_modules/finalhandler/package.json +8 -7
- package/node_modules/merge-descriptors/README.md +4 -3
- package/node_modules/merge-descriptors/index.js +3 -3
- package/node_modules/merge-descriptors/package.json +14 -7
- package/node_modules/mime-db/HISTORY.md +14 -0
- package/node_modules/mime-db/README.md +27 -24
- package/node_modules/mime-db/db.json +646 -62
- package/node_modules/mime-db/package.json +9 -13
- package/node_modules/mime-types/node_modules/mime-db/HISTORY.md +507 -0
- package/node_modules/mime-types/node_modules/mime-db/LICENSE +23 -0
- package/node_modules/mime-types/node_modules/mime-db/README.md +100 -0
- package/node_modules/mime-types/node_modules/mime-db/db.json +8519 -0
- package/node_modules/mime-types/node_modules/mime-db/index.js +12 -0
- package/node_modules/mime-types/node_modules/mime-db/package.json +60 -0
- package/node_modules/object-inspect/CHANGELOG.md +15 -0
- package/node_modules/object-inspect/index.js +4 -1
- package/node_modules/object-inspect/package.json +14 -9
- package/node_modules/object-inspect/readme.markdown +9 -11
- package/node_modules/path-to-regexp/index.js +57 -40
- package/node_modules/path-to-regexp/package.json +2 -2
- package/node_modules/qs/.editorconfig +3 -0
- package/node_modules/qs/.eslintrc +2 -2
- package/node_modules/qs/CHANGELOG.md +59 -5
- package/node_modules/qs/README.md +133 -49
- package/node_modules/qs/dist/qs.js +56 -2020
- package/node_modules/qs/lib/parse.js +46 -13
- package/node_modules/qs/lib/stringify.js +53 -28
- package/node_modules/qs/lib/utils.js +47 -34
- package/node_modules/qs/package.json +26 -12
- package/node_modules/qs/test/empty-keys-cases.js +267 -0
- package/node_modules/qs/test/parse.js +347 -32
- package/node_modules/qs/test/stringify.js +436 -47
- package/node_modules/send/HISTORY.md +5 -0
- package/node_modules/send/index.js +1 -2
- package/node_modules/send/node_modules/encodeurl/LICENSE +22 -0
- package/node_modules/send/node_modules/encodeurl/README.md +128 -0
- package/node_modules/send/node_modules/encodeurl/index.js +60 -0
- package/node_modules/send/node_modules/encodeurl/package.json +40 -0
- package/node_modules/send/package.json +1 -1
- package/node_modules/serve-static/HISTORY.md +16 -0
- package/node_modules/serve-static/index.js +1 -2
- package/node_modules/serve-static/package.json +3 -3
- package/node_modules/tslib/CopyrightNotice.txt +15 -0
- package/node_modules/tslib/LICENSE.txt +12 -0
- package/node_modules/tslib/README.md +164 -0
- package/node_modules/tslib/SECURITY.md +41 -0
- package/node_modules/tslib/modules/index.d.ts +37 -0
- package/node_modules/tslib/modules/index.js +68 -0
- package/node_modules/tslib/modules/package.json +3 -0
- package/node_modules/tslib/package.json +47 -0
- package/node_modules/tslib/tslib.d.ts +453 -0
- package/node_modules/tslib/tslib.es6.html +1 -0
- package/node_modules/tslib/tslib.es6.js +379 -0
- package/node_modules/tslib/tslib.es6.mjs +378 -0
- package/node_modules/tslib/tslib.html +1 -0
- package/node_modules/tslib/tslib.js +429 -0
- package/package.json +5 -5
- package/worldmap/index.html +1 -1
- package/worldmap/leaflet/leaflet.mousecoordinate.js +3 -3
- package/worldmap/worldmap.js +123 -36
- package/worldmap.html +1 -1
- package/worldmap.js +23 -4
- package/node_modules/@turf/bezier-spline/dist/es/lib/spline.js +0 -158
- package/node_modules/@turf/bezier-spline/dist/es/package.json +0 -1
- package/node_modules/@turf/bezier-spline/dist/js/index.js +0 -65
- package/node_modules/@turf/bezier-spline/dist/js/lib/spline.d.ts +0 -62
- package/node_modules/@turf/bezier-spline/dist/js/lib/spline.js +0 -160
- package/node_modules/@turf/helpers/dist/es/lib/geojson.js +0 -7
- package/node_modules/@turf/helpers/dist/es/package.json +0 -1
- package/node_modules/@turf/helpers/dist/js/index.js +0 -724
- package/node_modules/@turf/helpers/dist/js/lib/geojson.d.ts +0 -193
- package/node_modules/@turf/helpers/dist/js/lib/geojson.js +0 -9
- package/node_modules/@turf/invariant/dist/es/index.js +0 -223
- package/node_modules/@turf/invariant/dist/es/package.json +0 -1
- package/node_modules/@turf/invariant/dist/js/index.js +0 -233
- package/node_modules/path-to-regexp/History.md +0 -36
- /package/node_modules/{encodeurl → send/node_modules/encodeurl}/HISTORY.md +0 -0
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "mime-db",
|
|
3
|
+
"description": "Media Type Database",
|
|
4
|
+
"version": "1.52.0",
|
|
5
|
+
"contributors": [
|
|
6
|
+
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
|
7
|
+
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)",
|
|
8
|
+
"Robert Kieffer <robert@broofa.com> (http://github.com/broofa)"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"mime",
|
|
13
|
+
"db",
|
|
14
|
+
"type",
|
|
15
|
+
"types",
|
|
16
|
+
"database",
|
|
17
|
+
"charset",
|
|
18
|
+
"charsets"
|
|
19
|
+
],
|
|
20
|
+
"repository": "jshttp/mime-db",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"bluebird": "3.7.2",
|
|
23
|
+
"co": "4.6.0",
|
|
24
|
+
"cogent": "1.0.1",
|
|
25
|
+
"csv-parse": "4.16.3",
|
|
26
|
+
"eslint": "7.32.0",
|
|
27
|
+
"eslint-config-standard": "15.0.1",
|
|
28
|
+
"eslint-plugin-import": "2.25.4",
|
|
29
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
30
|
+
"eslint-plugin-node": "11.1.0",
|
|
31
|
+
"eslint-plugin-promise": "5.1.1",
|
|
32
|
+
"eslint-plugin-standard": "4.1.0",
|
|
33
|
+
"gnode": "0.1.2",
|
|
34
|
+
"media-typer": "1.1.0",
|
|
35
|
+
"mocha": "9.2.1",
|
|
36
|
+
"nyc": "15.1.0",
|
|
37
|
+
"raw-body": "2.5.0",
|
|
38
|
+
"stream-to-array": "2.3.0"
|
|
39
|
+
},
|
|
40
|
+
"files": [
|
|
41
|
+
"HISTORY.md",
|
|
42
|
+
"LICENSE",
|
|
43
|
+
"README.md",
|
|
44
|
+
"db.json",
|
|
45
|
+
"index.js"
|
|
46
|
+
],
|
|
47
|
+
"engines": {
|
|
48
|
+
"node": ">= 0.6"
|
|
49
|
+
},
|
|
50
|
+
"scripts": {
|
|
51
|
+
"build": "node scripts/build",
|
|
52
|
+
"fetch": "node scripts/fetch-apache && gnode scripts/fetch-iana && node scripts/fetch-nginx",
|
|
53
|
+
"lint": "eslint .",
|
|
54
|
+
"test": "mocha --reporter spec --bail --check-leaks test/",
|
|
55
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
56
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test",
|
|
57
|
+
"update": "npm run fetch && npm run build",
|
|
58
|
+
"version": "node scripts/version-history.js && git add HISTORY.md"
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.13.2](https://github.com/inspect-js/object-inspect/compare/v1.13.1...v1.13.2) - 2024-06-21
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [readme] update badges [`8a51e6b`](https://github.com/inspect-js/object-inspect/commit/8a51e6bedaf389ec40cc4659e9df53e8543d176e)
|
|
13
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `tape` [`ef05f58`](https://github.com/inspect-js/object-inspect/commit/ef05f58c9761a41416ab907299bf0fa79517014b)
|
|
14
|
+
- [Dev Deps] update `error-cause`, `has-tostringtag`, `tape` [`c0c6c26`](https://github.com/inspect-js/object-inspect/commit/c0c6c26c44cee6671f7c5d43d2b91d27c5c00d90)
|
|
15
|
+
- [Fix] Don't throw when `global` is not defined [`d4d0965`](https://github.com/inspect-js/object-inspect/commit/d4d096570f7dbd0e03266a96de11d05eb7b63e0f)
|
|
16
|
+
- [meta] add missing `engines.node` [`17a352a`](https://github.com/inspect-js/object-inspect/commit/17a352af6fe1ba6b70a19081674231eb1a50c940)
|
|
17
|
+
- [Dev Deps] update `globalthis` [`9c08884`](https://github.com/inspect-js/object-inspect/commit/9c08884aa662a149e2f11403f413927736b97da7)
|
|
18
|
+
- [Dev Deps] update `error-cause` [`6af352d`](https://github.com/inspect-js/object-inspect/commit/6af352d7c3929a4cc4c55768c27bf547a5e900f4)
|
|
19
|
+
- [Dev Deps] update `npmignore` [`94e617d`](https://github.com/inspect-js/object-inspect/commit/94e617d38831722562fa73dff4c895746861d267)
|
|
20
|
+
- [Dev Deps] update `mock-property` [`2ac24d7`](https://github.com/inspect-js/object-inspect/commit/2ac24d7e58cd388ad093c33249e413e05bbfd6c3)
|
|
21
|
+
- [Dev Deps] update `tape` [`46125e5`](https://github.com/inspect-js/object-inspect/commit/46125e58f1d1dcfb170ed3d1ea69da550ea8d77b)
|
|
22
|
+
|
|
8
23
|
## [v1.13.1](https://github.com/inspect-js/object-inspect/compare/v1.13.0...v1.13.1) - 2023-10-19
|
|
9
24
|
|
|
10
25
|
### Commits
|
|
@@ -244,7 +244,10 @@ module.exports = function inspect_(obj, options, depth, seen) {
|
|
|
244
244
|
if (typeof window !== 'undefined' && obj === window) {
|
|
245
245
|
return '{ [object Window] }';
|
|
246
246
|
}
|
|
247
|
-
if (
|
|
247
|
+
if (
|
|
248
|
+
(typeof globalThis !== 'undefined' && obj === globalThis)
|
|
249
|
+
|| (typeof global !== 'undefined' && obj === global)
|
|
250
|
+
) {
|
|
248
251
|
return '{ [object globalThis] }';
|
|
249
252
|
}
|
|
250
253
|
if (!isDate(obj) && !isRegExp(obj)) {
|
|
@@ -1,31 +1,33 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "object-inspect",
|
|
3
|
-
"version": "1.13.
|
|
3
|
+
"version": "1.13.2",
|
|
4
4
|
"description": "string representations of objects in node and the browser",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"devDependencies": {
|
|
8
|
-
"@ljharb/eslint-config": "^21.1.
|
|
8
|
+
"@ljharb/eslint-config": "^21.1.1",
|
|
9
9
|
"@pkgjs/support": "^0.0.6",
|
|
10
10
|
"auto-changelog": "^2.4.0",
|
|
11
11
|
"core-js": "^2.6.12",
|
|
12
|
-
"error-cause": "^1.0.
|
|
12
|
+
"error-cause": "^1.0.8",
|
|
13
13
|
"es-value-fixtures": "^1.4.2",
|
|
14
14
|
"eslint": "=8.8.0",
|
|
15
15
|
"for-each": "^0.3.3",
|
|
16
16
|
"functions-have-names": "^1.2.3",
|
|
17
17
|
"glob": "=10.3.7",
|
|
18
|
-
"globalthis": "^1.0.
|
|
19
|
-
"has-
|
|
18
|
+
"globalthis": "^1.0.4",
|
|
19
|
+
"has-symbols": "^1.0.3",
|
|
20
|
+
"has-tostringtag": "^1.0.2",
|
|
20
21
|
"in-publish": "^2.0.1",
|
|
21
22
|
"jackspeak": "=2.1.1",
|
|
22
23
|
"make-arrow-function": "^1.2.0",
|
|
23
|
-
"mock-property": "^1.0.
|
|
24
|
-
"npmignore": "^0.3.
|
|
24
|
+
"mock-property": "^1.0.3",
|
|
25
|
+
"npmignore": "^0.3.1",
|
|
25
26
|
"nyc": "^10.3.2",
|
|
26
27
|
"safe-publish-latest": "^2.0.0",
|
|
28
|
+
"safer-buffer": "^2.1.2",
|
|
27
29
|
"string.prototype.repeat": "^1.0.0",
|
|
28
|
-
"tape": "^5.
|
|
30
|
+
"tape": "^5.8.1"
|
|
29
31
|
},
|
|
30
32
|
"scripts": {
|
|
31
33
|
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
@@ -95,5 +97,8 @@
|
|
|
95
97
|
"./test-core-js.js"
|
|
96
98
|
]
|
|
97
99
|
},
|
|
98
|
-
"support": true
|
|
100
|
+
"support": true,
|
|
101
|
+
"engines": {
|
|
102
|
+
"node": ">= 0.4"
|
|
103
|
+
}
|
|
99
104
|
}
|
|
@@ -1,15 +1,13 @@
|
|
|
1
|
-
# object-inspect <sup>[![Version Badge][
|
|
1
|
+
# object-inspect <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
|
|
2
2
|
|
|
3
3
|
string representations of objects in node and the browser
|
|
4
4
|
|
|
5
5
|
[![github actions][actions-image]][actions-url]
|
|
6
6
|
[![coverage][codecov-image]][codecov-url]
|
|
7
|
-
[![dependency status][5]][6]
|
|
8
|
-
[![dev dependency status][7]][8]
|
|
9
7
|
[![License][license-image]][license-url]
|
|
10
8
|
[![Downloads][downloads-image]][downloads-url]
|
|
11
9
|
|
|
12
|
-
[![npm badge][
|
|
10
|
+
[![npm badge][npm-badge-png]][package-url]
|
|
13
11
|
|
|
14
12
|
# example
|
|
15
13
|
|
|
@@ -69,13 +67,13 @@ npm install object-inspect
|
|
|
69
67
|
|
|
70
68
|
MIT
|
|
71
69
|
|
|
72
|
-
[
|
|
73
|
-
[
|
|
74
|
-
[
|
|
75
|
-
[
|
|
76
|
-
[
|
|
77
|
-
[
|
|
78
|
-
[
|
|
70
|
+
[package-url]: https://npmjs.org/package/object-inspect
|
|
71
|
+
[npm-version-svg]: https://versionbadg.es/inspect-js/object-inspect.svg
|
|
72
|
+
[deps-svg]: https://david-dm.org/inspect-js/object-inspect.svg
|
|
73
|
+
[deps-url]: https://david-dm.org/inspect-js/object-inspect
|
|
74
|
+
[dev-deps-svg]: https://david-dm.org/inspect-js/object-inspect/dev-status.svg
|
|
75
|
+
[dev-deps-url]: https://david-dm.org/inspect-js/object-inspect#info=devDependencies
|
|
76
|
+
[npm-badge-png]: https://nodei.co/npm/object-inspect.png?downloads=true&stars=true
|
|
79
77
|
[license-image]: https://img.shields.io/npm/l/object-inspect.svg
|
|
80
78
|
[license-url]: LICENSE
|
|
81
79
|
[downloads-image]: https://img.shields.io/npm/dm/object-inspect.svg
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Expose `
|
|
2
|
+
* Expose `pathToRegexp`.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
module.exports =
|
|
5
|
+
module.exports = pathToRegexp;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* Match matching groups in a regular expression.
|
|
9
9
|
*/
|
|
10
|
-
var MATCHING_GROUP_REGEXP =
|
|
10
|
+
var MATCHING_GROUP_REGEXP = /\\.|\((?:\?<(.*?)>)?(?!\?)/g;
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* Normalize the given path string,
|
|
@@ -25,22 +25,27 @@ var MATCHING_GROUP_REGEXP = /\((?!\?)/g;
|
|
|
25
25
|
* @api private
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
-
function
|
|
28
|
+
function pathToRegexp(path, keys, options) {
|
|
29
29
|
options = options || {};
|
|
30
30
|
keys = keys || [];
|
|
31
31
|
var strict = options.strict;
|
|
32
32
|
var end = options.end !== false;
|
|
33
33
|
var flags = options.sensitive ? '' : 'i';
|
|
34
|
+
var lookahead = options.lookahead !== false;
|
|
34
35
|
var extraOffset = 0;
|
|
35
36
|
var keysOffset = keys.length;
|
|
36
37
|
var i = 0;
|
|
37
38
|
var name = 0;
|
|
39
|
+
var pos = 0;
|
|
40
|
+
var backtrack = '';
|
|
38
41
|
var m;
|
|
39
42
|
|
|
40
43
|
if (path instanceof RegExp) {
|
|
41
44
|
while (m = MATCHING_GROUP_REGEXP.exec(path.source)) {
|
|
45
|
+
if (m[0][0] === '\\') continue;
|
|
46
|
+
|
|
42
47
|
keys.push({
|
|
43
|
-
name: name++,
|
|
48
|
+
name: m[1] || name++,
|
|
44
49
|
optional: false,
|
|
45
50
|
offset: m.index
|
|
46
51
|
});
|
|
@@ -54,20 +59,47 @@ function pathtoRegexp(path, keys, options) {
|
|
|
54
59
|
// the same keys and options instance into every generation to get
|
|
55
60
|
// consistent matching groups before we join the sources together.
|
|
56
61
|
path = path.map(function (value) {
|
|
57
|
-
return
|
|
62
|
+
return pathToRegexp(value, keys, options).source;
|
|
58
63
|
});
|
|
59
64
|
|
|
60
|
-
return new RegExp(
|
|
65
|
+
return new RegExp(path.join('|'), flags);
|
|
61
66
|
}
|
|
62
67
|
|
|
63
|
-
path =
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
68
|
+
path = path.replace(
|
|
69
|
+
/\\.|(\/)?(\.)?:(\w+)(\(.*?\))?(\*)?(\?)?|[.*]|\/\(/g,
|
|
70
|
+
function (match, slash, format, key, capture, star, optional, offset) {
|
|
71
|
+
pos = offset + match.length;
|
|
72
|
+
|
|
73
|
+
if (match[0] === '\\') {
|
|
74
|
+
backtrack += match;
|
|
75
|
+
return match;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (match === '.') {
|
|
79
|
+
backtrack += '\\.';
|
|
80
|
+
extraOffset += 1;
|
|
81
|
+
return '\\.';
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
backtrack = slash || format ? '' : path.slice(pos, offset);
|
|
85
|
+
|
|
86
|
+
if (match === '*') {
|
|
87
|
+
extraOffset += 3;
|
|
88
|
+
return '(.*)';
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
if (match === '/(') {
|
|
92
|
+
backtrack += '/';
|
|
93
|
+
extraOffset += 2;
|
|
94
|
+
return '/(?:';
|
|
95
|
+
}
|
|
96
|
+
|
|
67
97
|
slash = slash || '';
|
|
68
|
-
format = format
|
|
69
|
-
capture = capture || '([^\\/' + format + ']+?)';
|
|
98
|
+
format = format ? '\\.' : '';
|
|
70
99
|
optional = optional || '';
|
|
100
|
+
capture = capture ?
|
|
101
|
+
capture.replace(/\\.|\*/, function (m) { return m === '*' ? '(.*)' : m; }) :
|
|
102
|
+
(backtrack ? '((?:(?!/|' + backtrack + ').)+?)' : '([^/' + format + ']+?)');
|
|
71
103
|
|
|
72
104
|
keys.push({
|
|
73
105
|
name: key,
|
|
@@ -75,41 +107,20 @@ function pathtoRegexp(path, keys, options) {
|
|
|
75
107
|
offset: offset + extraOffset
|
|
76
108
|
});
|
|
77
109
|
|
|
78
|
-
var result = ''
|
|
79
|
-
+
|
|
80
|
-
+ '(?:'
|
|
81
|
-
+ format + (optional ? slash : '') + capture
|
|
82
|
-
+ (star ? '((?:[\\/' + format + '].+?)?)' : '')
|
|
110
|
+
var result = '(?:'
|
|
111
|
+
+ format + slash + capture
|
|
112
|
+
+ (star ? '((?:[/' + format + '].+?)?)' : '')
|
|
83
113
|
+ ')'
|
|
84
114
|
+ optional;
|
|
85
115
|
|
|
86
116
|
extraOffset += result.length - match.length;
|
|
87
117
|
|
|
88
118
|
return result;
|
|
89
|
-
})
|
|
90
|
-
.replace(/\*/g, function (star, index) {
|
|
91
|
-
var len = keys.length
|
|
92
|
-
|
|
93
|
-
while (len-- > keysOffset && keys[len].offset > index) {
|
|
94
|
-
keys[len].offset += 3; // Replacement length minus asterisk length.
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return '(.*)';
|
|
98
119
|
});
|
|
99
120
|
|
|
100
121
|
// This is a workaround for handling unnamed matching groups.
|
|
101
122
|
while (m = MATCHING_GROUP_REGEXP.exec(path)) {
|
|
102
|
-
|
|
103
|
-
var index = m.index;
|
|
104
|
-
|
|
105
|
-
while (path.charAt(--index) === '\\') {
|
|
106
|
-
escapeCount++;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
// It's possible to escape the bracket.
|
|
110
|
-
if (escapeCount % 2 === 1) {
|
|
111
|
-
continue;
|
|
112
|
-
}
|
|
123
|
+
if (m[0][0] === '\\') continue;
|
|
113
124
|
|
|
114
125
|
if (keysOffset + i === keys.length || keys[keysOffset + i].offset > m.index) {
|
|
115
126
|
keys.splice(keysOffset + i, 0, {
|
|
@@ -122,8 +133,14 @@ function pathtoRegexp(path, keys, options) {
|
|
|
122
133
|
i++;
|
|
123
134
|
}
|
|
124
135
|
|
|
136
|
+
path += strict ? '' : path[path.length - 1] === '/' ? '?' : '/?';
|
|
137
|
+
|
|
125
138
|
// If the path is non-ending, match until the end or a slash.
|
|
126
|
-
|
|
139
|
+
if (end) {
|
|
140
|
+
path += '$';
|
|
141
|
+
} else if (path[path.length - 1] !== '/') {
|
|
142
|
+
path += lookahead ? '(?=/|$)' : '(?:/|$)';
|
|
143
|
+
}
|
|
127
144
|
|
|
128
|
-
return new RegExp(path, flags);
|
|
145
|
+
return new RegExp('^' + path, flags);
|
|
129
146
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "path-to-regexp",
|
|
3
3
|
"description": "Express style path to RegExp utility",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.10",
|
|
5
5
|
"files": [
|
|
6
6
|
"index.js",
|
|
7
7
|
"LICENSE"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"license": "MIT",
|
|
22
22
|
"repository": {
|
|
23
23
|
"type": "git",
|
|
24
|
-
"url": "https://github.com/
|
|
24
|
+
"url": "https://github.com/pillarjs/path-to-regexp.git"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"mocha": "^1.17.1",
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
"id-length": [2, { "min": 1, "max": 25, "properties": "never" }],
|
|
15
15
|
"indent": [2, 4],
|
|
16
16
|
"max-lines-per-function": [2, { "max": 150 }],
|
|
17
|
-
"max-params": [2,
|
|
18
|
-
"max-statements": [2,
|
|
17
|
+
"max-params": [2, 18],
|
|
18
|
+
"max-statements": [2, 100],
|
|
19
19
|
"multiline-comment-style": 0,
|
|
20
20
|
"no-continue": 1,
|
|
21
21
|
"no-magic-numbers": 0,
|
|
@@ -1,4 +1,58 @@
|
|
|
1
|
-
## **6.
|
|
1
|
+
## **6.13.0**
|
|
2
|
+
- [New] `parse`: add `strictDepth` option (#511)
|
|
3
|
+
- [Tests] use `npm audit` instead of `aud`
|
|
4
|
+
|
|
5
|
+
## **6.12.3**
|
|
6
|
+
- [Fix] `parse`: properly account for `strictNullHandling` when `allowEmptyArrays`
|
|
7
|
+
- [meta] fix changelog indentation
|
|
8
|
+
|
|
9
|
+
## **6.12.2**
|
|
10
|
+
- [Fix] `parse`: parse encoded square brackets (#506)
|
|
11
|
+
- [readme] add CII best practices badge
|
|
12
|
+
|
|
13
|
+
## **6.12.1**
|
|
14
|
+
- [Fix] `parse`: Disable `decodeDotInKeys` by default to restore previous behavior (#501)
|
|
15
|
+
- [Performance] `utils`: Optimize performance under large data volumes, reduce memory usage, and speed up processing (#502)
|
|
16
|
+
- [Refactor] `utils`: use `+=`
|
|
17
|
+
- [Tests] increase coverage
|
|
18
|
+
|
|
19
|
+
## **6.12.0**
|
|
20
|
+
|
|
21
|
+
- [New] `parse`/`stringify`: add `decodeDotInKeys`/`encodeDotKeys` options (#488)
|
|
22
|
+
- [New] `parse`: add `duplicates` option
|
|
23
|
+
- [New] `parse`/`stringify`: add `allowEmptyArrays` option to allow [] in object values (#487)
|
|
24
|
+
- [Refactor] `parse`/`stringify`: move allowDots config logic to its own variable
|
|
25
|
+
- [Refactor] `stringify`: move option-handling code into `normalizeStringifyOptions`
|
|
26
|
+
- [readme] update readme, add logos (#484)
|
|
27
|
+
- [readme] `stringify`: clarify default `arrayFormat` behavior
|
|
28
|
+
- [readme] fix line wrapping
|
|
29
|
+
- [readme] remove dead badges
|
|
30
|
+
- [Deps] update `side-channel`
|
|
31
|
+
- [meta] make the dist build 50% smaller
|
|
32
|
+
- [meta] add `sideEffects` flag
|
|
33
|
+
- [meta] run build in prepack, not prepublish
|
|
34
|
+
- [Tests] `parse`: remove useless tests; add coverage
|
|
35
|
+
- [Tests] `stringify`: increase coverage
|
|
36
|
+
- [Tests] use `mock-property`
|
|
37
|
+
- [Tests] `stringify`: improve coverage
|
|
38
|
+
- [Dev Deps] update `@ljharb/eslint-config `, `aud`, `has-override-mistake`, `has-property-descriptors`, `mock-property`, `npmignore`, `object-inspect`, `tape`
|
|
39
|
+
- [Dev Deps] pin `glob`, since v10.3.8+ requires a broken `jackspeak`
|
|
40
|
+
- [Dev Deps] pin `jackspeak` since 2.1.2+ depends on npm aliases, which kill the install process in npm < 6
|
|
41
|
+
|
|
42
|
+
## **6.11.2**
|
|
43
|
+
- [Fix] `parse`: Fix parsing when the global Object prototype is frozen (#473)
|
|
44
|
+
- [Tests] add passing test cases with empty keys (#473)
|
|
45
|
+
|
|
46
|
+
## **6.11.1**
|
|
47
|
+
- [Fix] `stringify`: encode comma values more consistently (#463)
|
|
48
|
+
- [readme] add usage of `filter` option for injecting custom serialization, i.e. of custom types (#447)
|
|
49
|
+
- [meta] remove extraneous code backticks (#457)
|
|
50
|
+
- [meta] fix changelog markdown
|
|
51
|
+
- [actions] update checkout action
|
|
52
|
+
- [actions] restrict action permissions
|
|
53
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape`
|
|
54
|
+
|
|
55
|
+
## **6.11.0**
|
|
2
56
|
- [New] [Fix] `stringify`: revert 0e903c0; add `commaRoundTrip` option (#442)
|
|
3
57
|
- [readme] fix version badge
|
|
4
58
|
|
|
@@ -238,7 +292,7 @@
|
|
|
238
292
|
|
|
239
293
|
## **6.5.3**
|
|
240
294
|
- [Fix] `parse`: ignore `__proto__` keys (#428)
|
|
241
|
-
- [Fix]
|
|
295
|
+
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
|
|
242
296
|
- [Fix] correctly parse nested arrays
|
|
243
297
|
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
|
|
244
298
|
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
|
|
@@ -291,7 +345,7 @@
|
|
|
291
345
|
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
|
|
292
346
|
- [Fix] use `safer-buffer` instead of `Buffer` constructor
|
|
293
347
|
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
|
|
294
|
-
- [Fix]
|
|
348
|
+
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
|
|
295
349
|
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
|
|
296
350
|
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
|
|
297
351
|
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
|
|
@@ -320,7 +374,7 @@
|
|
|
320
374
|
- [Fix] `parse`: ignore `__proto__` keys (#428)
|
|
321
375
|
- [Fix] fix for an impossible situation: when the formatter is called with a non-string value
|
|
322
376
|
- [Fix] `utils.merge`: avoid a crash with a null target and an array source
|
|
323
|
-
- [Fix]
|
|
377
|
+
- [Fix] `utils.merge`: avoid a crash with a null target and a truthy non-array source
|
|
324
378
|
- [Fix] `stringify`: fix a crash with `strictNullHandling` and a custom `filter`/`serializeDate` (#279)
|
|
325
379
|
- [Fix] `utils`: `merge`: fix crash when `source` is a truthy primitive & no options are provided
|
|
326
380
|
- [Fix] when `parseArrays` is false, properly handle keys ending in `[]`
|
|
@@ -407,7 +461,7 @@
|
|
|
407
461
|
- [New] add "encoder" and "decoder" options, for custom param encoding/decoding (#160)
|
|
408
462
|
- [Fix] fix compacting of nested sparse arrays (#150)
|
|
409
463
|
|
|
410
|
-
## **6.1.2
|
|
464
|
+
## **6.1.2**
|
|
411
465
|
- [Fix] follow `allowPrototypes` option during merge (#201, #200)
|
|
412
466
|
- [Fix] chmod a-x
|
|
413
467
|
- [Fix] support keys starting with brackets (#202, #200)
|