node-red-contrib-web-worldmap 2.29.0 → 2.30.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.
Files changed (188) hide show
  1. package/.github/FUNDING.yml +13 -0
  2. package/CHANGELOG.md +6 -2
  3. package/README.md +4 -10
  4. package/node_modules/array-flatten/package.json +6 -9
  5. package/node_modules/body-parser/HISTORY.md +18 -0
  6. package/node_modules/body-parser/README.md +9 -1
  7. package/node_modules/body-parser/SECURITY.md +25 -0
  8. package/node_modules/body-parser/lib/read.js +26 -2
  9. package/node_modules/body-parser/lib/types/json.js +10 -4
  10. package/node_modules/body-parser/package.json +24 -20
  11. package/node_modules/call-bind/.eslintignore +1 -0
  12. package/node_modules/call-bind/.eslintrc +17 -0
  13. package/node_modules/call-bind/.github/FUNDING.yml +12 -0
  14. package/node_modules/call-bind/.nycrc +13 -0
  15. package/node_modules/call-bind/CHANGELOG.md +42 -0
  16. package/node_modules/call-bind/LICENSE +21 -0
  17. package/node_modules/call-bind/README.md +2 -0
  18. package/node_modules/call-bind/callBound.js +15 -0
  19. package/node_modules/call-bind/index.js +47 -0
  20. package/node_modules/call-bind/package.json +108 -0
  21. package/node_modules/call-bind/test/callBound.js +55 -0
  22. package/node_modules/call-bind/test/index.js +66 -0
  23. package/node_modules/cookie/HISTORY.md +8 -0
  24. package/node_modules/cookie/README.md +50 -34
  25. package/node_modules/cookie/SECURITY.md +25 -0
  26. package/node_modules/cookie/index.js +83 -15
  27. package/node_modules/cookie/package.json +17 -15
  28. package/node_modules/cookie-signature/package.json +6 -9
  29. package/node_modules/depd/History.md +7 -0
  30. package/node_modules/depd/LICENSE +1 -1
  31. package/node_modules/depd/Readme.md +8 -8
  32. package/node_modules/depd/index.js +29 -13
  33. package/node_modules/depd/package.json +25 -24
  34. package/node_modules/destroy/LICENSE +1 -0
  35. package/node_modules/destroy/README.md +15 -12
  36. package/node_modules/destroy/index.js +147 -13
  37. package/node_modules/destroy/package.json +29 -20
  38. package/node_modules/ee-first/package.json +6 -9
  39. package/node_modules/encodeurl/package.json +11 -14
  40. package/node_modules/escape-html/package.json +11 -14
  41. package/node_modules/etag/package.json +11 -14
  42. package/node_modules/express/History.md +54 -0
  43. package/node_modules/express/Readme.md +39 -31
  44. package/node_modules/express/lib/application.js +18 -1
  45. package/node_modules/express/lib/response.js +40 -18
  46. package/node_modules/express/lib/router/index.js +20 -15
  47. package/node_modules/express/lib/router/route.js +9 -0
  48. package/node_modules/express/lib/utils.js +1 -0
  49. package/node_modules/express/lib/view.js +1 -1
  50. package/node_modules/express/package.json +25 -26
  51. package/node_modules/finalhandler/HISTORY.md +8 -0
  52. package/node_modules/finalhandler/LICENSE +1 -1
  53. package/node_modules/finalhandler/README.md +5 -6
  54. package/node_modules/finalhandler/SECURITY.md +25 -0
  55. package/node_modules/finalhandler/index.js +8 -3
  56. package/node_modules/finalhandler/package.json +30 -32
  57. package/node_modules/fresh/package.json +6 -9
  58. package/node_modules/function-bind/.editorconfig +20 -0
  59. package/node_modules/function-bind/.eslintrc +15 -0
  60. package/node_modules/function-bind/.jscs.json +176 -0
  61. package/node_modules/function-bind/.npmignore +22 -0
  62. package/node_modules/function-bind/.travis.yml +168 -0
  63. package/node_modules/function-bind/LICENSE +20 -0
  64. package/node_modules/function-bind/README.md +48 -0
  65. package/node_modules/function-bind/implementation.js +52 -0
  66. package/node_modules/function-bind/index.js +5 -0
  67. package/node_modules/function-bind/package.json +96 -0
  68. package/node_modules/function-bind/test/.eslintrc +9 -0
  69. package/node_modules/function-bind/test/index.js +252 -0
  70. package/node_modules/get-intrinsic/.eslintrc +37 -0
  71. package/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
  72. package/node_modules/get-intrinsic/.nycrc +9 -0
  73. package/node_modules/get-intrinsic/CHANGELOG.md +98 -0
  74. package/node_modules/get-intrinsic/LICENSE +21 -0
  75. package/node_modules/get-intrinsic/README.md +71 -0
  76. package/node_modules/get-intrinsic/index.js +334 -0
  77. package/node_modules/get-intrinsic/package.json +120 -0
  78. package/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
  79. package/node_modules/has/LICENSE-MIT +22 -0
  80. package/node_modules/has/README.md +18 -0
  81. package/node_modules/has/package.json +73 -0
  82. package/node_modules/has/src/index.js +5 -0
  83. package/node_modules/has/test/index.js +10 -0
  84. package/node_modules/has-symbols/.eslintrc +11 -0
  85. package/node_modules/has-symbols/.github/FUNDING.yml +12 -0
  86. package/node_modules/has-symbols/.nycrc +9 -0
  87. package/node_modules/has-symbols/CHANGELOG.md +75 -0
  88. package/node_modules/has-symbols/LICENSE +21 -0
  89. package/node_modules/has-symbols/README.md +46 -0
  90. package/node_modules/has-symbols/index.js +13 -0
  91. package/node_modules/has-symbols/package.json +126 -0
  92. package/node_modules/has-symbols/shams.js +42 -0
  93. package/node_modules/has-symbols/test/index.js +22 -0
  94. package/node_modules/has-symbols/test/shams/core-js.js +28 -0
  95. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
  96. package/node_modules/has-symbols/test/tests.js +56 -0
  97. package/node_modules/http-errors/HISTORY.md +15 -0
  98. package/node_modules/http-errors/README.md +2 -2
  99. package/node_modules/http-errors/index.js +15 -25
  100. package/node_modules/http-errors/package.json +22 -20
  101. package/node_modules/media-typer/package.json +6 -9
  102. package/node_modules/merge-descriptors/package.json +6 -9
  103. package/node_modules/methods/package.json +11 -14
  104. package/node_modules/object-inspect/.eslintrc +53 -0
  105. package/node_modules/object-inspect/.github/FUNDING.yml +12 -0
  106. package/node_modules/object-inspect/.nycrc +13 -0
  107. package/node_modules/object-inspect/CHANGELOG.md +360 -0
  108. package/node_modules/object-inspect/LICENSE +21 -0
  109. package/node_modules/object-inspect/example/all.js +23 -0
  110. package/node_modules/object-inspect/example/circular.js +6 -0
  111. package/node_modules/object-inspect/example/fn.js +5 -0
  112. package/node_modules/object-inspect/example/inspect.js +10 -0
  113. package/node_modules/object-inspect/index.js +512 -0
  114. package/node_modules/object-inspect/package-support.json +20 -0
  115. package/node_modules/object-inspect/package.json +122 -0
  116. package/node_modules/object-inspect/readme.markdown +86 -0
  117. package/node_modules/object-inspect/test/bigint.js +58 -0
  118. package/node_modules/object-inspect/test/browser/dom.js +15 -0
  119. package/node_modules/object-inspect/test/circular.js +16 -0
  120. package/node_modules/object-inspect/test/deep.js +12 -0
  121. package/node_modules/object-inspect/test/element.js +53 -0
  122. package/node_modules/object-inspect/test/err.js +48 -0
  123. package/node_modules/object-inspect/test/fakes.js +29 -0
  124. package/node_modules/object-inspect/test/fn.js +76 -0
  125. package/node_modules/object-inspect/test/has.js +15 -0
  126. package/node_modules/object-inspect/test/holes.js +15 -0
  127. package/node_modules/object-inspect/test/indent-option.js +271 -0
  128. package/node_modules/object-inspect/test/inspect.js +139 -0
  129. package/node_modules/object-inspect/test/lowbyte.js +12 -0
  130. package/node_modules/object-inspect/test/number.js +58 -0
  131. package/node_modules/object-inspect/test/quoteStyle.js +17 -0
  132. package/node_modules/object-inspect/test/toStringTag.js +40 -0
  133. package/node_modules/object-inspect/test/undef.js +12 -0
  134. package/node_modules/object-inspect/test/values.js +211 -0
  135. package/node_modules/object-inspect/test-core-js.js +26 -0
  136. package/node_modules/object-inspect/util.inspect.js +1 -0
  137. package/node_modules/on-finished/HISTORY.md +10 -0
  138. package/node_modules/on-finished/README.md +28 -20
  139. package/node_modules/on-finished/index.js +51 -13
  140. package/node_modules/on-finished/package.json +25 -20
  141. package/node_modules/path-to-regexp/package.json +6 -9
  142. package/node_modules/qs/CHANGELOG.md +22 -5
  143. package/node_modules/qs/README.md +7 -0
  144. package/node_modules/qs/dist/qs.js +1207 -5
  145. package/node_modules/qs/lib/parse.js +6 -0
  146. package/node_modules/qs/lib/stringify.js +33 -3
  147. package/node_modules/qs/package.json +16 -13
  148. package/node_modules/qs/test/parse.js +9 -0
  149. package/node_modules/qs/test/stringify.js +62 -1
  150. package/node_modules/raw-body/HISTORY.md +14 -0
  151. package/node_modules/raw-body/LICENSE +1 -1
  152. package/node_modules/raw-body/README.md +4 -0
  153. package/node_modules/raw-body/SECURITY.md +24 -0
  154. package/node_modules/raw-body/index.js +45 -2
  155. package/node_modules/raw-body/package.json +16 -15
  156. package/node_modules/send/HISTORY.md +15 -0
  157. package/node_modules/send/LICENSE +1 -1
  158. package/node_modules/send/README.md +2 -2
  159. package/node_modules/send/SECURITY.md +24 -0
  160. package/node_modules/send/index.js +37 -27
  161. package/node_modules/send/package.json +22 -21
  162. package/node_modules/serve-static/HISTORY.md +12 -0
  163. package/node_modules/serve-static/README.md +1 -1
  164. package/node_modules/serve-static/package.json +16 -16
  165. package/node_modules/side-channel/.eslintignore +1 -0
  166. package/node_modules/side-channel/.eslintrc +11 -0
  167. package/node_modules/side-channel/.github/FUNDING.yml +12 -0
  168. package/node_modules/side-channel/.nycrc +13 -0
  169. package/node_modules/side-channel/CHANGELOG.md +65 -0
  170. package/node_modules/side-channel/LICENSE +21 -0
  171. package/node_modules/side-channel/README.md +2 -0
  172. package/node_modules/side-channel/index.js +124 -0
  173. package/node_modules/side-channel/package.json +95 -0
  174. package/node_modules/side-channel/test/index.js +78 -0
  175. package/node_modules/statuses/HISTORY.md +17 -0
  176. package/node_modules/statuses/README.md +51 -42
  177. package/node_modules/statuses/codes.json +2 -3
  178. package/node_modules/statuses/index.js +52 -19
  179. package/node_modules/statuses/package.json +29 -31
  180. package/node_modules/unpipe/package.json +7 -9
  181. package/node_modules/utils-merge/package.json +6 -9
  182. package/package.json +2 -2
  183. package/worldmap/worldmap.js +22 -7
  184. package/worldmap.html +17 -1
  185. package/worldmap.js +553 -551
  186. package/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
  187. package/node_modules/depd/lib/compat/event-listener-count.js +0 -22
  188. package/node_modules/depd/lib/compat/index.js +0 -79
@@ -0,0 +1,46 @@
1
+ # has-symbols <sup>[![Version Badge][2]][1]</sup>
2
+
3
+ [![github actions][actions-image]][actions-url]
4
+ [![coverage][codecov-image]][codecov-url]
5
+ [![dependency status][5]][6]
6
+ [![dev dependency status][7]][8]
7
+ [![License][license-image]][license-url]
8
+ [![Downloads][downloads-image]][downloads-url]
9
+
10
+ [![npm badge][11]][1]
11
+
12
+ Determine if the JS environment has Symbol support. Supports spec, or shams.
13
+
14
+ ## Example
15
+
16
+ ```js
17
+ var hasSymbols = require('has-symbols');
18
+
19
+ hasSymbols() === true; // if the environment has native Symbol support. Not polyfillable, not forgeable.
20
+
21
+ var hasSymbolsKinda = require('has-symbols/shams');
22
+ hasSymbolsKinda() === true; // if the environment has a Symbol sham that mostly follows the spec.
23
+ ```
24
+
25
+ ## Supported Symbol shams
26
+ - get-own-property-symbols [npm](https://www.npmjs.com/package/get-own-property-symbols) | [github](https://github.com/WebReflection/get-own-property-symbols)
27
+ - core-js [npm](https://www.npmjs.com/package/core-js) | [github](https://github.com/zloirock/core-js)
28
+
29
+ ## Tests
30
+ Simply clone the repo, `npm install`, and run `npm test`
31
+
32
+ [1]: https://npmjs.org/package/has-symbols
33
+ [2]: https://versionbadg.es/inspect-js/has-symbols.svg
34
+ [5]: https://david-dm.org/inspect-js/has-symbols.svg
35
+ [6]: https://david-dm.org/inspect-js/has-symbols
36
+ [7]: https://david-dm.org/inspect-js/has-symbols/dev-status.svg
37
+ [8]: https://david-dm.org/inspect-js/has-symbols#info=devDependencies
38
+ [11]: https://nodei.co/npm/has-symbols.png?downloads=true&stars=true
39
+ [license-image]: https://img.shields.io/npm/l/has-symbols.svg
40
+ [license-url]: LICENSE
41
+ [downloads-image]: https://img.shields.io/npm/dm/has-symbols.svg
42
+ [downloads-url]: https://npm-stat.com/charts.html?package=has-symbols
43
+ [codecov-image]: https://codecov.io/gh/inspect-js/has-symbols/branch/main/graphs/badge.svg
44
+ [codecov-url]: https://app.codecov.io/gh/inspect-js/has-symbols/
45
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-symbols
46
+ [actions-url]: https://github.com/inspect-js/has-symbols/actions
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
4
+ var hasSymbolSham = require('./shams');
5
+
6
+ module.exports = function hasNativeSymbols() {
7
+ if (typeof origSymbol !== 'function') { return false; }
8
+ if (typeof Symbol !== 'function') { return false; }
9
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
10
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
11
+
12
+ return hasSymbolSham();
13
+ };
@@ -0,0 +1,126 @@
1
+ {
2
+ "_from": "has-symbols@^1.0.3",
3
+ "_id": "has-symbols@1.0.3",
4
+ "_inBundle": false,
5
+ "_integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
6
+ "_location": "/has-symbols",
7
+ "_phantomChildren": {},
8
+ "_requested": {
9
+ "type": "range",
10
+ "registry": true,
11
+ "raw": "has-symbols@^1.0.3",
12
+ "name": "has-symbols",
13
+ "escapedName": "has-symbols",
14
+ "rawSpec": "^1.0.3",
15
+ "saveSpec": null,
16
+ "fetchSpec": "^1.0.3"
17
+ },
18
+ "_requiredBy": [
19
+ "/get-intrinsic"
20
+ ],
21
+ "_resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
22
+ "_shasum": "bb7b2c4349251dce87b125f7bdf874aa7c8b39f8",
23
+ "_spec": "has-symbols@^1.0.3",
24
+ "_where": "/Users/conway/Projects/worldmap/node_modules/get-intrinsic",
25
+ "author": {
26
+ "name": "Jordan Harband",
27
+ "email": "ljharb@gmail.com",
28
+ "url": "http://ljharb.codes"
29
+ },
30
+ "auto-changelog": {
31
+ "output": "CHANGELOG.md",
32
+ "template": "keepachangelog",
33
+ "unreleased": false,
34
+ "commitLimit": false,
35
+ "backfillLimit": false,
36
+ "hideCredit": true
37
+ },
38
+ "bugs": {
39
+ "url": "https://github.com/ljharb/has-symbols/issues"
40
+ },
41
+ "bundleDependencies": false,
42
+ "contributors": [
43
+ {
44
+ "name": "Jordan Harband",
45
+ "email": "ljharb@gmail.com",
46
+ "url": "http://ljharb.codes"
47
+ }
48
+ ],
49
+ "deprecated": false,
50
+ "description": "Determine if the JS environment has Symbol support. Supports spec, or shams.",
51
+ "devDependencies": {
52
+ "@ljharb/eslint-config": "^20.2.3",
53
+ "aud": "^2.0.0",
54
+ "auto-changelog": "^2.4.0",
55
+ "core-js": "^2.6.12",
56
+ "eslint": "=8.8.0",
57
+ "get-own-property-symbols": "^0.9.5",
58
+ "nyc": "^10.3.2",
59
+ "safe-publish-latest": "^2.0.0",
60
+ "tape": "^5.5.2"
61
+ },
62
+ "engines": {
63
+ "node": ">= 0.4"
64
+ },
65
+ "funding": {
66
+ "url": "https://github.com/sponsors/ljharb"
67
+ },
68
+ "greenkeeper": {
69
+ "ignore": [
70
+ "core-js"
71
+ ]
72
+ },
73
+ "homepage": "https://github.com/ljharb/has-symbols#readme",
74
+ "keywords": [
75
+ "Symbol",
76
+ "symbols",
77
+ "typeof",
78
+ "sham",
79
+ "polyfill",
80
+ "native",
81
+ "core-js",
82
+ "ES6"
83
+ ],
84
+ "license": "MIT",
85
+ "main": "index.js",
86
+ "name": "has-symbols",
87
+ "repository": {
88
+ "type": "git",
89
+ "url": "git://github.com/inspect-js/has-symbols.git"
90
+ },
91
+ "scripts": {
92
+ "lint": "eslint --ext=js,mjs .",
93
+ "posttest": "aud --production",
94
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
95
+ "prepublish": "not-in-publish || npm run prepublishOnly",
96
+ "prepublishOnly": "safe-publish-latest",
97
+ "pretest": "npm run --silent lint",
98
+ "test": "npm run tests-only",
99
+ "test:shams": "npm run --silent test:shams:getownpropertysymbols && npm run --silent test:shams:corejs",
100
+ "test:shams:corejs": "nyc node test/shams/core-js.js",
101
+ "test:shams:getownpropertysymbols": "nyc node test/shams/get-own-property-symbols.js",
102
+ "test:staging": "nyc node --harmony --es-staging test",
103
+ "test:stock": "nyc node test",
104
+ "tests-only": "npm run test:stock && npm run test:staging && npm run test:shams",
105
+ "version": "auto-changelog && git add CHANGELOG.md"
106
+ },
107
+ "testling": {
108
+ "files": "test/index.js",
109
+ "browsers": [
110
+ "iexplore/6.0..latest",
111
+ "firefox/3.0..6.0",
112
+ "firefox/15.0..latest",
113
+ "firefox/nightly",
114
+ "chrome/4.0..10.0",
115
+ "chrome/20.0..latest",
116
+ "chrome/canary",
117
+ "opera/10.0..latest",
118
+ "opera/next",
119
+ "safari/4.0..latest",
120
+ "ipad/6.0..latest",
121
+ "iphone/6.0..latest",
122
+ "android-browser/4.2"
123
+ ]
124
+ },
125
+ "version": "1.0.3"
126
+ }
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
4
+ module.exports = function hasSymbols() {
5
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
6
+ if (typeof Symbol.iterator === 'symbol') { return true; }
7
+
8
+ var obj = {};
9
+ var sym = Symbol('test');
10
+ var symObj = Object(sym);
11
+ if (typeof sym === 'string') { return false; }
12
+
13
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
14
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
15
+
16
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
17
+ // if (sym instanceof Symbol) { return false; }
18
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
19
+ // if (!(symObj instanceof Symbol)) { return false; }
20
+
21
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
22
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
23
+
24
+ var symVal = 42;
25
+ obj[sym] = symVal;
26
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
27
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
28
+
29
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
30
+
31
+ var syms = Object.getOwnPropertySymbols(obj);
32
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
33
+
34
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
35
+
36
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
37
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
38
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
39
+ }
40
+
41
+ return true;
42
+ };
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+ var hasSymbols = require('../');
5
+ var runSymbolTests = require('./tests');
6
+
7
+ test('interface', function (t) {
8
+ t.equal(typeof hasSymbols, 'function', 'is a function');
9
+ t.equal(typeof hasSymbols(), 'boolean', 'returns a boolean');
10
+ t.end();
11
+ });
12
+
13
+ test('Symbols are supported', { skip: !hasSymbols() }, function (t) {
14
+ runSymbolTests(t);
15
+ t.end();
16
+ });
17
+
18
+ test('Symbols are not supported', { skip: hasSymbols() }, function (t) {
19
+ t.equal(typeof Symbol, 'undefined', 'global Symbol is undefined');
20
+ t.equal(typeof Object.getOwnPropertySymbols, 'undefined', 'Object.getOwnPropertySymbols does not exist');
21
+ t.end();
22
+ });
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+
5
+ if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
6
+ test('has native Symbol support', function (t) {
7
+ t.equal(typeof Symbol, 'function');
8
+ t.equal(typeof Symbol(), 'symbol');
9
+ t.end();
10
+ });
11
+ return;
12
+ }
13
+
14
+ var hasSymbols = require('../../shams');
15
+
16
+ test('polyfilled Symbols', function (t) {
17
+ /* eslint-disable global-require */
18
+ t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
19
+ require('core-js/fn/symbol');
20
+ require('core-js/fn/symbol/to-string-tag');
21
+
22
+ require('../tests')(t);
23
+
24
+ var hasSymbolsAfter = hasSymbols();
25
+ t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
26
+ /* eslint-enable global-require */
27
+ t.end();
28
+ });
@@ -0,0 +1,28 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+
5
+ if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
6
+ test('has native Symbol support', function (t) {
7
+ t.equal(typeof Symbol, 'function');
8
+ t.equal(typeof Symbol(), 'symbol');
9
+ t.end();
10
+ });
11
+ return;
12
+ }
13
+
14
+ var hasSymbols = require('../../shams');
15
+
16
+ test('polyfilled Symbols', function (t) {
17
+ /* eslint-disable global-require */
18
+ t.equal(hasSymbols(), false, 'hasSymbols is false before polyfilling');
19
+
20
+ require('get-own-property-symbols');
21
+
22
+ require('../tests')(t);
23
+
24
+ var hasSymbolsAfter = hasSymbols();
25
+ t.equal(hasSymbolsAfter, true, 'hasSymbols is true after polyfilling');
26
+ /* eslint-enable global-require */
27
+ t.end();
28
+ });
@@ -0,0 +1,56 @@
1
+ 'use strict';
2
+
3
+ // eslint-disable-next-line consistent-return
4
+ module.exports = function runSymbolTests(t) {
5
+ t.equal(typeof Symbol, 'function', 'global Symbol is a function');
6
+
7
+ if (typeof Symbol !== 'function') { return false; }
8
+
9
+ t.notEqual(Symbol(), Symbol(), 'two symbols are not equal');
10
+
11
+ /*
12
+ t.equal(
13
+ Symbol.prototype.toString.call(Symbol('foo')),
14
+ Symbol.prototype.toString.call(Symbol('foo')),
15
+ 'two symbols with the same description stringify the same'
16
+ );
17
+ */
18
+
19
+ /*
20
+ var foo = Symbol('foo');
21
+
22
+ t.notEqual(
23
+ String(foo),
24
+ String(Symbol('bar')),
25
+ 'two symbols with different descriptions do not stringify the same'
26
+ );
27
+ */
28
+
29
+ t.equal(typeof Symbol.prototype.toString, 'function', 'Symbol#toString is a function');
30
+ // t.equal(String(foo), Symbol.prototype.toString.call(foo), 'Symbol#toString equals String of the same symbol');
31
+
32
+ t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function');
33
+
34
+ var obj = {};
35
+ var sym = Symbol('test');
36
+ var symObj = Object(sym);
37
+ t.notEqual(typeof sym, 'string', 'Symbol is not a string');
38
+ t.equal(Object.prototype.toString.call(sym), '[object Symbol]', 'symbol primitive Object#toStrings properly');
39
+ t.equal(Object.prototype.toString.call(symObj), '[object Symbol]', 'symbol primitive Object#toStrings properly');
40
+
41
+ var symVal = 42;
42
+ obj[sym] = symVal;
43
+ // eslint-disable-next-line no-restricted-syntax
44
+ for (sym in obj) { t.fail('symbol property key was found in for..in of object'); }
45
+
46
+ t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object');
47
+ t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object');
48
+ t.deepEqual(Object.getOwnPropertySymbols(obj), [sym], 'one own symbol on symbol-valued object');
49
+ t.equal(Object.prototype.propertyIsEnumerable.call(obj, sym), true, 'symbol is enumerable');
50
+ t.deepEqual(Object.getOwnPropertyDescriptor(obj, sym), {
51
+ configurable: true,
52
+ enumerable: true,
53
+ value: 42,
54
+ writable: true
55
+ }, 'property descriptor is correct');
56
+ };
@@ -1,3 +1,18 @@
1
+ 2.0.0 / 2021-12-17
2
+ ==================
3
+
4
+ * Drop support for Node.js 0.6
5
+ * Remove `I'mateapot` export; use `ImATeapot` instead
6
+ * Remove support for status being non-first argument
7
+ * Rename `UnorderedCollection` constructor to `TooEarly`
8
+ * deps: depd@2.0.0
9
+ - Replace internal `eval` usage with `Function` constructor
10
+ - Use instance methods on `process` to check for listeners
11
+ * deps: statuses@2.0.1
12
+ - Fix messaging casing of `418 I'm a Teapot`
13
+ - Remove code 306
14
+ - Rename `425 Unordered Collection` to standard `425 Too Early`
15
+
1
16
  2021-11-14 / 1.8.1
2
17
  ==================
3
18
 
@@ -14,7 +14,7 @@ This is a [Node.js](https://nodejs.org/en/) module available through the
14
14
  [npm registry](https://www.npmjs.com/). Installation is done using the
15
15
  [`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
16
16
 
17
- ```bash
17
+ ```console
18
18
  $ npm install http-errors
19
19
  ```
20
20
 
@@ -133,7 +133,7 @@ var err = new createError.NotFound()
133
133
  |422 |UnprocessableEntity |
134
134
  |423 |Locked |
135
135
  |424 |FailedDependency |
136
- |425 |UnorderedCollection |
136
+ |425 |TooEarly |
137
137
  |426 |UpgradeRequired |
138
138
  |428 |PreconditionRequired |
139
139
  |429 |TooManyRequests |
@@ -54,24 +54,18 @@ function createError () {
54
54
  var props = {}
55
55
  for (var i = 0; i < arguments.length; i++) {
56
56
  var arg = arguments[i]
57
- if (arg instanceof Error) {
57
+ var type = typeof arg
58
+ if (type === 'object' && arg instanceof Error) {
58
59
  err = arg
59
60
  status = err.status || err.statusCode || status
60
- continue
61
- }
62
- switch (typeof arg) {
63
- case 'string':
64
- msg = arg
65
- break
66
- case 'number':
67
- status = arg
68
- if (i !== 0) {
69
- deprecate('non-first-argument status code; replace with createError(' + arg + ', ...)')
70
- }
71
- break
72
- case 'object':
73
- props = arg
74
- break
61
+ } else if (type === 'number' && i === 0) {
62
+ status = arg
63
+ } else if (type === 'string') {
64
+ msg = arg
65
+ } else if (type === 'object') {
66
+ props = arg
67
+ } else {
68
+ throw new TypeError('argument #' + (i + 1) + ' unsupported type ' + type)
75
69
  }
76
70
  }
77
71
 
@@ -80,7 +74,7 @@ function createError () {
80
74
  }
81
75
 
82
76
  if (typeof status !== 'number' ||
83
- (!statuses[status] && (status < 400 || status >= 600))) {
77
+ (!statuses.message[status] && (status < 400 || status >= 600))) {
84
78
  status = 500
85
79
  }
86
80
 
@@ -91,7 +85,7 @@ function createError () {
91
85
  // create error
92
86
  err = HttpError
93
87
  ? new HttpError(msg)
94
- : new Error(msg || statuses[status])
88
+ : new Error(msg || statuses.message[status])
95
89
  Error.captureStackTrace(err, createError)
96
90
  }
97
91
 
@@ -135,7 +129,7 @@ function createClientErrorConstructor (HttpError, name, code) {
135
129
 
136
130
  function ClientError (message) {
137
131
  // create the error object
138
- var msg = message != null ? message : statuses[code]
132
+ var msg = message != null ? message : statuses.message[code]
139
133
  var err = new Error(msg)
140
134
 
141
135
  // capture a stack trace to the construction point
@@ -204,7 +198,7 @@ function createServerErrorConstructor (HttpError, name, code) {
204
198
 
205
199
  function ServerError (message) {
206
200
  // create the error object
207
- var msg = message != null ? message : statuses[code]
201
+ var msg = message != null ? message : statuses.message[code]
208
202
  var err = new Error(msg)
209
203
 
210
204
  // capture a stack trace to the construction point
@@ -264,7 +258,7 @@ function nameFunc (func, name) {
264
258
  function populateConstructorExports (exports, codes, HttpError) {
265
259
  codes.forEach(function forEachCode (code) {
266
260
  var CodeError
267
- var name = toIdentifier(statuses[code])
261
+ var name = toIdentifier(statuses.message[code])
268
262
 
269
263
  switch (codeClass(code)) {
270
264
  case 400:
@@ -281,10 +275,6 @@ function populateConstructorExports (exports, codes, HttpError) {
281
275
  exports[name] = CodeError
282
276
  }
283
277
  })
284
-
285
- // backwards-compatibility
286
- exports["I'mateapot"] = deprecate.function(exports.ImATeapot,
287
- '"I\'mateapot"; use "ImATeapot" instead')
288
278
  }
289
279
 
290
280
  /**
@@ -1,29 +1,30 @@
1
1
  {
2
- "_from": "http-errors@1.8.1",
3
- "_id": "http-errors@1.8.1",
2
+ "_from": "http-errors@2.0.0",
3
+ "_id": "http-errors@2.0.0",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==",
6
- "_location": "/node-red-contrib-web-worldmap/http-errors",
5
+ "_integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==",
6
+ "_location": "/http-errors",
7
7
  "_phantomChildren": {},
8
8
  "_requested": {
9
9
  "type": "version",
10
10
  "registry": true,
11
- "raw": "http-errors@1.8.1",
11
+ "raw": "http-errors@2.0.0",
12
12
  "name": "http-errors",
13
13
  "escapedName": "http-errors",
14
- "rawSpec": "1.8.1",
14
+ "rawSpec": "2.0.0",
15
15
  "saveSpec": null,
16
- "fetchSpec": "1.8.1"
16
+ "fetchSpec": "2.0.0"
17
17
  },
18
18
  "_requiredBy": [
19
- "/node-red-contrib-web-worldmap/body-parser",
20
- "/node-red-contrib-web-worldmap/raw-body",
21
- "/node-red-contrib-web-worldmap/send"
19
+ "/body-parser",
20
+ "/express",
21
+ "/raw-body",
22
+ "/send"
22
23
  ],
23
- "_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz",
24
- "_shasum": "7c3f28577cbc8a207388455dbd62295ed07bd68c",
25
- "_spec": "http-errors@1.8.1",
26
- "_where": "/Users/conway/Projects/worldmap/node_modules/body-parser",
24
+ "_resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz",
25
+ "_shasum": "b7774a1486ef73cf7667ac9ae0858c012c57b9d3",
26
+ "_spec": "http-errors@2.0.0",
27
+ "_where": "/Users/conway/Projects/worldmap/node_modules/express",
27
28
  "author": {
28
29
  "name": "Jonathan Ong",
29
30
  "email": "me@jongleberry.com",
@@ -44,10 +45,10 @@
44
45
  }
45
46
  ],
46
47
  "dependencies": {
47
- "depd": "~1.1.2",
48
+ "depd": "2.0.0",
48
49
  "inherits": "2.0.4",
49
50
  "setprototypeof": "1.2.0",
50
- "statuses": ">= 1.5.0 < 2",
51
+ "statuses": "2.0.1",
51
52
  "toidentifier": "1.0.1"
52
53
  },
53
54
  "deprecated": false,
@@ -58,13 +59,13 @@
58
59
  "eslint-plugin-import": "2.25.3",
59
60
  "eslint-plugin-markdown": "2.2.1",
60
61
  "eslint-plugin-node": "11.1.0",
61
- "eslint-plugin-promise": "5.1.1",
62
+ "eslint-plugin-promise": "5.2.0",
62
63
  "eslint-plugin-standard": "4.1.0",
63
64
  "mocha": "9.1.3",
64
65
  "nyc": "15.1.0"
65
66
  },
66
67
  "engines": {
67
- "node": ">= 0.6"
68
+ "node": ">= 0.8"
68
69
  },
69
70
  "files": [
70
71
  "index.js",
@@ -87,7 +88,8 @@
87
88
  "lint": "eslint . && node ./scripts/lint-readme-list.js",
88
89
  "test": "mocha --reporter spec --bail",
89
90
  "test-ci": "nyc --reporter=lcov --reporter=text npm test",
90
- "test-cov": "nyc --reporter=html --reporter=text npm test"
91
+ "test-cov": "nyc --reporter=html --reporter=text npm test",
92
+ "version": "node scripts/version-history.js && git add HISTORY.md"
91
93
  },
92
- "version": "1.8.1"
94
+ "version": "2.0.0"
93
95
  }
@@ -1,14 +1,8 @@
1
1
  {
2
- "_args": [
3
- [
4
- "media-typer@0.3.0",
5
- "/Users/conway/Projects/worldmap"
6
- ]
7
- ],
8
2
  "_from": "media-typer@0.3.0",
9
3
  "_id": "media-typer@0.3.0",
10
4
  "_inBundle": false,
11
- "_integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=",
5
+ "_integrity": "sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==",
12
6
  "_location": "/media-typer",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
@@ -25,8 +19,9 @@
25
19
  "/type-is"
26
20
  ],
27
21
  "_resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz",
28
- "_spec": "0.3.0",
29
- "_where": "/Users/conway/Projects/worldmap",
22
+ "_shasum": "8710d7af0aa626f8fffa1ce00168545263255748",
23
+ "_spec": "media-typer@0.3.0",
24
+ "_where": "/Users/conway/Projects/worldmap/node_modules/type-is",
30
25
  "author": {
31
26
  "name": "Douglas Christopher Wilson",
32
27
  "email": "doug@somethingdoug.com"
@@ -34,6 +29,8 @@
34
29
  "bugs": {
35
30
  "url": "https://github.com/jshttp/media-typer/issues"
36
31
  },
32
+ "bundleDependencies": false,
33
+ "deprecated": false,
37
34
  "description": "Simple RFC 6838 media type parser and formatter",
38
35
  "devDependencies": {
39
36
  "istanbul": "0.3.2",
@@ -1,14 +1,8 @@
1
1
  {
2
- "_args": [
3
- [
4
- "merge-descriptors@1.0.1",
5
- "/Users/conway/Projects/worldmap"
6
- ]
7
- ],
8
2
  "_from": "merge-descriptors@1.0.1",
9
3
  "_id": "merge-descriptors@1.0.1",
10
4
  "_inBundle": false,
11
- "_integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=",
5
+ "_integrity": "sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==",
12
6
  "_location": "/merge-descriptors",
13
7
  "_phantomChildren": {},
14
8
  "_requested": {
@@ -25,8 +19,9 @@
25
19
  "/express"
26
20
  ],
27
21
  "_resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz",
28
- "_spec": "1.0.1",
29
- "_where": "/Users/conway/Projects/worldmap",
22
+ "_shasum": "b00aaa556dd8b44568150ec9d1b953f3f90cbb61",
23
+ "_spec": "merge-descriptors@1.0.1",
24
+ "_where": "/Users/conway/Projects/worldmap/node_modules/express",
30
25
  "author": {
31
26
  "name": "Jonathan Ong",
32
27
  "email": "me@jongleberry.com",
@@ -35,6 +30,7 @@
35
30
  "bugs": {
36
31
  "url": "https://github.com/component/merge-descriptors/issues"
37
32
  },
33
+ "bundleDependencies": false,
38
34
  "contributors": [
39
35
  {
40
36
  "name": "Douglas Christopher Wilson",
@@ -45,6 +41,7 @@
45
41
  "email": "grabbou@gmail.com"
46
42
  }
47
43
  ],
44
+ "deprecated": false,
48
45
  "description": "Merge objects using descriptors",
49
46
  "devDependencies": {
50
47
  "istanbul": "0.4.1",