node-red-contrib-web-worldmap 4.6.1 → 4.6.3

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 (173) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +6 -3
  3. package/node_modules/body-parser/HISTORY.md +8 -0
  4. package/node_modules/body-parser/README.md +11 -10
  5. package/node_modules/body-parser/lib/types/json.js +15 -4
  6. package/node_modules/body-parser/package.json +8 -8
  7. package/node_modules/call-bind/.eslintrc +0 -1
  8. package/node_modules/call-bind/.nycrc +0 -4
  9. package/node_modules/call-bind/CHANGELOG.md +51 -0
  10. package/node_modules/call-bind/README.md +63 -1
  11. package/node_modules/call-bind/index.js +11 -23
  12. package/node_modules/call-bind/package.json +38 -23
  13. package/node_modules/call-bind/test/callBound.js +0 -1
  14. package/node_modules/call-bind/test/index.js +18 -4
  15. package/node_modules/content-type/HISTORY.md +5 -0
  16. package/node_modules/content-type/README.md +21 -19
  17. package/node_modules/content-type/index.js +12 -9
  18. package/node_modules/content-type/package.json +13 -11
  19. package/node_modules/define-data-property/.eslintrc +24 -0
  20. package/node_modules/define-data-property/.github/FUNDING.yml +12 -0
  21. package/node_modules/define-data-property/.nycrc +13 -0
  22. package/node_modules/define-data-property/CHANGELOG.md +70 -0
  23. package/node_modules/define-data-property/LICENSE +21 -0
  24. package/node_modules/define-data-property/README.md +67 -0
  25. package/node_modules/define-data-property/index.d.ts +12 -0
  26. package/node_modules/define-data-property/index.js +56 -0
  27. package/node_modules/define-data-property/package.json +106 -0
  28. package/node_modules/define-data-property/test/index.js +392 -0
  29. package/node_modules/define-data-property/tsconfig.json +59 -0
  30. package/node_modules/es-define-property/.eslintrc +13 -0
  31. package/node_modules/es-define-property/.github/FUNDING.yml +12 -0
  32. package/node_modules/es-define-property/.nycrc +9 -0
  33. package/node_modules/es-define-property/CHANGELOG.md +15 -0
  34. package/node_modules/es-define-property/LICENSE +21 -0
  35. package/node_modules/es-define-property/README.md +49 -0
  36. package/node_modules/es-define-property/index.d.ts +3 -0
  37. package/node_modules/es-define-property/index.js +16 -0
  38. package/node_modules/es-define-property/package.json +81 -0
  39. package/node_modules/es-define-property/test/index.js +55 -0
  40. package/node_modules/es-define-property/tsconfig.json +50 -0
  41. package/node_modules/es-errors/.eslintrc +5 -0
  42. package/node_modules/es-errors/.github/FUNDING.yml +12 -0
  43. package/node_modules/es-errors/CHANGELOG.md +40 -0
  44. package/node_modules/es-errors/LICENSE +21 -0
  45. package/node_modules/es-errors/README.md +55 -0
  46. package/node_modules/es-errors/eval.d.ts +3 -0
  47. package/node_modules/es-errors/eval.js +4 -0
  48. package/node_modules/es-errors/index.d.ts +3 -0
  49. package/node_modules/es-errors/index.js +4 -0
  50. package/node_modules/es-errors/package.json +80 -0
  51. package/node_modules/es-errors/range.d.ts +3 -0
  52. package/node_modules/es-errors/range.js +4 -0
  53. package/node_modules/es-errors/ref.d.ts +3 -0
  54. package/node_modules/es-errors/ref.js +4 -0
  55. package/node_modules/es-errors/syntax.d.ts +3 -0
  56. package/node_modules/es-errors/syntax.js +4 -0
  57. package/node_modules/es-errors/test/index.js +19 -0
  58. package/node_modules/es-errors/tsconfig.json +49 -0
  59. package/node_modules/es-errors/type.d.ts +3 -0
  60. package/node_modules/es-errors/type.js +4 -0
  61. package/node_modules/es-errors/uri.d.ts +3 -0
  62. package/node_modules/es-errors/uri.js +4 -0
  63. package/node_modules/express/History.md +14 -5
  64. package/node_modules/express/Readme.md +1 -1
  65. package/node_modules/express/lib/router/index.js +1 -1
  66. package/node_modules/express/lib/router/route.js +7 -2
  67. package/node_modules/express/lib/utils.js +3 -4
  68. package/node_modules/express/package.json +5 -6
  69. package/node_modules/function-bind/.eslintrc +11 -5
  70. package/node_modules/function-bind/.github/FUNDING.yml +12 -0
  71. package/node_modules/function-bind/.github/SECURITY.md +3 -0
  72. package/node_modules/function-bind/.nycrc +13 -0
  73. package/node_modules/function-bind/CHANGELOG.md +136 -0
  74. package/node_modules/function-bind/README.md +25 -27
  75. package/node_modules/function-bind/implementation.js +44 -12
  76. package/node_modules/function-bind/package.json +38 -14
  77. package/node_modules/get-intrinsic/.eslintrc +1 -0
  78. package/node_modules/get-intrinsic/CHANGELOG.md +45 -0
  79. package/node_modules/get-intrinsic/index.js +41 -16
  80. package/node_modules/get-intrinsic/package.json +20 -18
  81. package/node_modules/get-intrinsic/test/GetIntrinsic.js +1 -1
  82. package/node_modules/gopd/.eslintrc +16 -0
  83. package/node_modules/gopd/.github/FUNDING.yml +12 -0
  84. package/node_modules/gopd/CHANGELOG.md +25 -0
  85. package/node_modules/gopd/LICENSE +21 -0
  86. package/node_modules/gopd/README.md +40 -0
  87. package/node_modules/gopd/index.js +16 -0
  88. package/node_modules/gopd/package.json +71 -0
  89. package/node_modules/gopd/test/index.js +35 -0
  90. package/node_modules/has-property-descriptors/.eslintrc +13 -0
  91. package/node_modules/has-property-descriptors/.github/FUNDING.yml +12 -0
  92. package/node_modules/has-property-descriptors/.nycrc +9 -0
  93. package/node_modules/has-property-descriptors/CHANGELOG.md +35 -0
  94. package/node_modules/has-property-descriptors/LICENSE +21 -0
  95. package/node_modules/has-property-descriptors/README.md +43 -0
  96. package/node_modules/has-property-descriptors/index.js +22 -0
  97. package/node_modules/has-property-descriptors/package.json +77 -0
  98. package/node_modules/has-property-descriptors/test/index.js +57 -0
  99. package/node_modules/has-proto/.eslintrc +5 -0
  100. package/node_modules/has-proto/.github/FUNDING.yml +12 -0
  101. package/node_modules/has-proto/CHANGELOG.md +38 -0
  102. package/node_modules/has-proto/LICENSE +21 -0
  103. package/node_modules/has-proto/README.md +38 -0
  104. package/node_modules/has-proto/index.d.ts +3 -0
  105. package/node_modules/has-proto/index.js +15 -0
  106. package/node_modules/has-proto/package.json +78 -0
  107. package/node_modules/has-proto/test/index.js +19 -0
  108. package/node_modules/has-proto/tsconfig.json +49 -0
  109. package/node_modules/hasown/.eslintrc +5 -0
  110. package/node_modules/hasown/.github/FUNDING.yml +12 -0
  111. package/node_modules/hasown/.nycrc +13 -0
  112. package/node_modules/hasown/CHANGELOG.md +28 -0
  113. package/node_modules/hasown/LICENSE +21 -0
  114. package/node_modules/hasown/README.md +40 -0
  115. package/node_modules/hasown/index.d.ts +3 -0
  116. package/node_modules/hasown/index.js +8 -0
  117. package/node_modules/hasown/package.json +89 -0
  118. package/node_modules/hasown/tsconfig.json +49 -0
  119. package/node_modules/http-parser-js/README.md +43 -0
  120. package/node_modules/http-parser-js/http-parser.d.ts +175 -0
  121. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/http-parser.js +12 -7
  122. package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/package.json +4 -2
  123. package/node_modules/object-inspect/CHANGELOG.md +29 -0
  124. package/node_modules/object-inspect/index.js +18 -6
  125. package/node_modules/object-inspect/package.json +13 -8
  126. package/node_modules/object-inspect/test/global.js +17 -0
  127. package/node_modules/raw-body/HISTORY.md +5 -0
  128. package/node_modules/raw-body/README.md +1 -1
  129. package/node_modules/raw-body/index.js +7 -0
  130. package/node_modules/raw-body/package.json +7 -7
  131. package/node_modules/set-function-length/.eslintrc +27 -0
  132. package/node_modules/set-function-length/.github/FUNDING.yml +12 -0
  133. package/node_modules/set-function-length/.nycrc +13 -0
  134. package/node_modules/set-function-length/CHANGELOG.md +59 -0
  135. package/node_modules/set-function-length/LICENSE +21 -0
  136. package/node_modules/set-function-length/README.md +56 -0
  137. package/node_modules/set-function-length/env.d.ts +6 -0
  138. package/node_modules/set-function-length/env.d.ts.map +1 -0
  139. package/node_modules/set-function-length/env.js +24 -0
  140. package/node_modules/set-function-length/index.d.ts +7 -0
  141. package/node_modules/set-function-length/index.d.ts.map +1 -0
  142. package/node_modules/set-function-length/index.js +44 -0
  143. package/node_modules/set-function-length/package.json +104 -0
  144. package/node_modules/set-function-length/tsconfig.json +59 -0
  145. package/node_modules/{function-bind → side-channel}/.editorconfig +3 -14
  146. package/node_modules/side-channel/.eslintrc +1 -1
  147. package/node_modules/side-channel/CHANGELOG.md +30 -0
  148. package/node_modules/side-channel/index.d.ts +27 -0
  149. package/node_modules/side-channel/index.js +25 -20
  150. package/node_modules/side-channel/package.json +36 -19
  151. package/node_modules/side-channel/test/index.js +6 -1
  152. package/node_modules/side-channel/tsconfig.json +50 -0
  153. package/package.json +1 -1
  154. package/worldmap/index.html +2 -2
  155. package/worldmap/worldmap.js +4 -2
  156. package/worldmap.js +2 -2
  157. package/node_modules/function-bind/.jscs.json +0 -176
  158. package/node_modules/function-bind/.npmignore +0 -22
  159. package/node_modules/function-bind/.travis.yml +0 -168
  160. package/node_modules/has/LICENSE-MIT +0 -22
  161. package/node_modules/has/README.md +0 -18
  162. package/node_modules/has/package.json +0 -48
  163. package/node_modules/has/src/index.js +0 -5
  164. package/node_modules/has/test/index.js +0 -10
  165. package/node_modules/side-channel/.eslintignore +0 -1
  166. package/node_modules/websocket-driver/node_modules/http-parser-js/CHANGELOG.md +0 -14
  167. package/node_modules/websocket-driver/node_modules/http-parser-js/README.md +0 -31
  168. /package/node_modules/{compression/node_modules/bytes → bytes}/History.md +0 -0
  169. /package/node_modules/{compression/node_modules/bytes → bytes}/LICENSE +0 -0
  170. /package/node_modules/{compression/node_modules/bytes → bytes}/Readme.md +0 -0
  171. /package/node_modules/{compression/node_modules/bytes → bytes}/index.js +0 -0
  172. /package/node_modules/{compression/node_modules/bytes → bytes}/package.json +0 -0
  173. /package/node_modules/{websocket-driver/node_modules/http-parser-js → http-parser-js}/LICENSE.md +0 -0
@@ -2,9 +2,15 @@
2
2
 
3
3
  var undefined;
4
4
 
5
- var $SyntaxError = SyntaxError;
5
+ var $Error = require('es-errors');
6
+ var $EvalError = require('es-errors/eval');
7
+ var $RangeError = require('es-errors/range');
8
+ var $ReferenceError = require('es-errors/ref');
9
+ var $SyntaxError = require('es-errors/syntax');
10
+ var $TypeError = require('es-errors/type');
11
+ var $URIError = require('es-errors/uri');
12
+
6
13
  var $Function = Function;
7
- var $TypeError = TypeError;
8
14
 
9
15
  // eslint-disable-next-line consistent-return
10
16
  var getEvalledConstructor = function (expressionSyntax) {
@@ -43,18 +49,24 @@ var ThrowTypeError = $gOPD
43
49
  : throwTypeError;
44
50
 
45
51
  var hasSymbols = require('has-symbols')();
52
+ var hasProto = require('has-proto')();
46
53
 
47
- var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
54
+ var getProto = Object.getPrototypeOf || (
55
+ hasProto
56
+ ? function (x) { return x.__proto__; } // eslint-disable-line no-proto
57
+ : null
58
+ );
48
59
 
49
60
  var needsEval = {};
50
61
 
51
- var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array);
62
+ var TypedArray = typeof Uint8Array === 'undefined' || !getProto ? undefined : getProto(Uint8Array);
52
63
 
53
64
  var INTRINSICS = {
65
+ __proto__: null,
54
66
  '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError,
55
67
  '%Array%': Array,
56
68
  '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer,
57
- '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined,
69
+ '%ArrayIteratorPrototype%': hasSymbols && getProto ? getProto([][Symbol.iterator]()) : undefined,
58
70
  '%AsyncFromSyncIteratorPrototype%': undefined,
59
71
  '%AsyncFunction%': needsEval,
60
72
  '%AsyncGenerator%': needsEval,
@@ -62,6 +74,8 @@ var INTRINSICS = {
62
74
  '%AsyncIteratorPrototype%': needsEval,
63
75
  '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics,
64
76
  '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt,
77
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined : BigInt64Array,
78
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined : BigUint64Array,
65
79
  '%Boolean%': Boolean,
66
80
  '%DataView%': typeof DataView === 'undefined' ? undefined : DataView,
67
81
  '%Date%': Date,
@@ -69,9 +83,9 @@ var INTRINSICS = {
69
83
  '%decodeURIComponent%': decodeURIComponent,
70
84
  '%encodeURI%': encodeURI,
71
85
  '%encodeURIComponent%': encodeURIComponent,
72
- '%Error%': Error,
86
+ '%Error%': $Error,
73
87
  '%eval%': eval, // eslint-disable-line no-eval
74
- '%EvalError%': EvalError,
88
+ '%EvalError%': $EvalError,
75
89
  '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array,
76
90
  '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array,
77
91
  '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry,
@@ -82,10 +96,10 @@ var INTRINSICS = {
82
96
  '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array,
83
97
  '%isFinite%': isFinite,
84
98
  '%isNaN%': isNaN,
85
- '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined,
99
+ '%IteratorPrototype%': hasSymbols && getProto ? getProto(getProto([][Symbol.iterator]())) : undefined,
86
100
  '%JSON%': typeof JSON === 'object' ? JSON : undefined,
87
101
  '%Map%': typeof Map === 'undefined' ? undefined : Map,
88
- '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()),
102
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Map()[Symbol.iterator]()),
89
103
  '%Math%': Math,
90
104
  '%Number%': Number,
91
105
  '%Object%': Object,
@@ -93,15 +107,15 @@ var INTRINSICS = {
93
107
  '%parseInt%': parseInt,
94
108
  '%Promise%': typeof Promise === 'undefined' ? undefined : Promise,
95
109
  '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy,
96
- '%RangeError%': RangeError,
97
- '%ReferenceError%': ReferenceError,
110
+ '%RangeError%': $RangeError,
111
+ '%ReferenceError%': $ReferenceError,
98
112
  '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect,
99
113
  '%RegExp%': RegExp,
100
114
  '%Set%': typeof Set === 'undefined' ? undefined : Set,
101
- '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()),
115
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols || !getProto ? undefined : getProto(new Set()[Symbol.iterator]()),
102
116
  '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer,
103
117
  '%String%': String,
104
- '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined,
118
+ '%StringIteratorPrototype%': hasSymbols && getProto ? getProto(''[Symbol.iterator]()) : undefined,
105
119
  '%Symbol%': hasSymbols ? Symbol : undefined,
106
120
  '%SyntaxError%': $SyntaxError,
107
121
  '%ThrowTypeError%': ThrowTypeError,
@@ -111,12 +125,22 @@ var INTRINSICS = {
111
125
  '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray,
112
126
  '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array,
113
127
  '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array,
114
- '%URIError%': URIError,
128
+ '%URIError%': $URIError,
115
129
  '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap,
116
130
  '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef,
117
131
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet
118
132
  };
119
133
 
134
+ if (getProto) {
135
+ try {
136
+ null.error; // eslint-disable-line no-unused-expressions
137
+ } catch (e) {
138
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
139
+ var errorProto = getProto(getProto(e));
140
+ INTRINSICS['%Error.prototype%'] = errorProto;
141
+ }
142
+ }
143
+
120
144
  var doEval = function doEval(name) {
121
145
  var value;
122
146
  if (name === '%AsyncFunction%') {
@@ -132,7 +156,7 @@ var doEval = function doEval(name) {
132
156
  }
133
157
  } else if (name === '%AsyncIteratorPrototype%') {
134
158
  var gen = doEval('%AsyncGenerator%');
135
- if (gen) {
159
+ if (gen && getProto) {
136
160
  value = getProto(gen.prototype);
137
161
  }
138
162
  }
@@ -143,6 +167,7 @@ var doEval = function doEval(name) {
143
167
  };
144
168
 
145
169
  var LEGACY_ALIASES = {
170
+ __proto__: null,
146
171
  '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
147
172
  '%ArrayPrototype%': ['Array', 'prototype'],
148
173
  '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
@@ -197,7 +222,7 @@ var LEGACY_ALIASES = {
197
222
  };
198
223
 
199
224
  var bind = require('function-bind');
200
- var hasOwn = require('has');
225
+ var hasOwn = require('hasown');
201
226
  var $concat = bind.call(Function.call, Array.prototype.concat);
202
227
  var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
203
228
  var $replace = bind.call(Function.call, String.prototype.replace);
@@ -1,17 +1,13 @@
1
1
  {
2
2
  "name": "get-intrinsic",
3
- "version": "1.1.3",
3
+ "version": "1.2.4",
4
4
  "description": "Get and robustly cache all JS language-level intrinsics at first require time",
5
5
  "main": "index.js",
6
6
  "exports": {
7
- ".": [
8
- {
9
- "default": "./index.js"
10
- },
11
- "./index.js"
12
- ],
7
+ ".": "./index.js",
13
8
  "./package.json": "./package.json"
14
9
  },
10
+ "sideEffects": false,
15
11
  "scripts": {
16
12
  "prepack": "npmignore --auto --commentLines=autogenerated",
17
13
  "prepublish": "not-in-publish || npm run prepublishOnly",
@@ -48,24 +44,25 @@
48
44
  },
49
45
  "homepage": "https://github.com/ljharb/get-intrinsic#readme",
50
46
  "devDependencies": {
51
- "@ljharb/eslint-config": "^21.0.0",
52
- "aud": "^2.0.0",
47
+ "@ljharb/eslint-config": "^21.1.0",
48
+ "aud": "^2.0.4",
53
49
  "auto-changelog": "^2.4.0",
54
- "call-bind": "^1.0.2",
55
- "es-abstract": "^1.20.2",
50
+ "call-bind": "^1.0.5",
51
+ "es-abstract": "^1.22.3",
56
52
  "es-value-fixtures": "^1.4.2",
57
53
  "eslint": "=8.8.0",
58
54
  "evalmd": "^0.0.19",
59
55
  "for-each": "^0.3.3",
56
+ "gopd": "^1.0.1",
60
57
  "make-async-function": "^1.0.0",
61
58
  "make-async-generator-function": "^1.0.0",
62
59
  "make-generator-function": "^2.0.0",
63
- "mock-property": "^1.0.0",
64
- "npmignore": "^0.3.0",
60
+ "mock-property": "^1.0.3",
61
+ "npmignore": "^0.3.1",
65
62
  "nyc": "^10.3.2",
66
- "object-inspect": "^1.12.2",
63
+ "object-inspect": "^1.13.1",
67
64
  "safe-publish-latest": "^2.0.0",
68
- "tape": "^5.6.0"
65
+ "tape": "^5.7.4"
69
66
  },
70
67
  "auto-changelog": {
71
68
  "output": "CHANGELOG.md",
@@ -76,9 +73,11 @@
76
73
  "hideCredit": true
77
74
  },
78
75
  "dependencies": {
79
- "function-bind": "^1.1.1",
80
- "has": "^1.0.3",
81
- "has-symbols": "^1.0.3"
76
+ "es-errors": "^1.3.0",
77
+ "function-bind": "^1.1.2",
78
+ "has-proto": "^1.0.1",
79
+ "has-symbols": "^1.0.3",
80
+ "hasown": "^2.0.0"
82
81
  },
83
82
  "testling": {
84
83
  "files": "test/GetIntrinsic.js"
@@ -87,5 +86,8 @@
87
86
  "ignore": [
88
87
  ".github/workflows"
89
88
  ]
89
+ },
90
+ "engines": {
91
+ "node": ">= 0.4"
90
92
  }
91
93
  }
@@ -12,7 +12,7 @@ var mockProperty = require('mock-property');
12
12
 
13
13
  var callBound = require('call-bind/callBound');
14
14
  var v = require('es-value-fixtures');
15
- var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
15
+ var $gOPD = require('gopd');
16
16
  var DefinePropertyOrThrow = require('es-abstract/2021/DefinePropertyOrThrow');
17
17
 
18
18
  var $isProto = callBound('%Object.prototype.isPrototypeOf%');
@@ -0,0 +1,16 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "func-style": [2, "declaration"],
8
+ "id-length": 0,
9
+ "multiline-comment-style": 0,
10
+ "new-cap": [2, {
11
+ "capIsNewExceptions": [
12
+ "GetIntrinsic",
13
+ ],
14
+ }],
15
+ },
16
+ }
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [ljharb]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: npm/gopd
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,25 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [v1.0.1](https://github.com/ljharb/gopd/compare/v1.0.0...v1.0.1) - 2022-11-01
9
+
10
+ ### Commits
11
+
12
+ - [Fix] actually export gOPD instead of dP [`4b624bf`](https://github.com/ljharb/gopd/commit/4b624bfbeff788c5e3ff16d9443a83627847234f)
13
+
14
+ ## v1.0.0 - 2022-11-01
15
+
16
+ ### Commits
17
+
18
+ - Initial implementation, tests, readme [`0911e01`](https://github.com/ljharb/gopd/commit/0911e012cd642092bd88b732c161c58bf4f20bea)
19
+ - Initial commit [`b84e33f`](https://github.com/ljharb/gopd/commit/b84e33f5808a805ac57ff88d4247ad935569acbe)
20
+ - [actions] add reusable workflows [`12ae28a`](https://github.com/ljharb/gopd/commit/12ae28ae5f50f86e750215b6e2188901646d0119)
21
+ - npm init [`280118b`](https://github.com/ljharb/gopd/commit/280118badb45c80b4483836b5cb5315bddf6e582)
22
+ - [meta] add `auto-changelog` [`bb78de5`](https://github.com/ljharb/gopd/commit/bb78de5639a180747fb290c28912beaaf1615709)
23
+ - [meta] create FUNDING.yml; add `funding` in package.json [`11c22e6`](https://github.com/ljharb/gopd/commit/11c22e6355bb01f24e7fac4c9bb3055eb5b25002)
24
+ - [meta] use `npmignore` to autogenerate an npmignore file [`4f4537a`](https://github.com/ljharb/gopd/commit/4f4537a843b39f698c52f072845092e6fca345bb)
25
+ - Only apps should have lockfiles [`c567022`](https://github.com/ljharb/gopd/commit/c567022a18573aa7951cf5399445d9840e23e98b)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Jordan Harband
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,40 @@
1
+ # gopd <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
+
3
+ [![github actions][actions-image]][actions-url]
4
+ [![coverage][codecov-image]][codecov-url]
5
+ [![License][license-image]][license-url]
6
+ [![Downloads][downloads-image]][downloads-url]
7
+
8
+ [![npm badge][npm-badge-png]][package-url]
9
+
10
+ `Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.
11
+
12
+ ## Usage
13
+
14
+ ```javascript
15
+ var gOPD = require('gopd');
16
+ var assert = require('assert');
17
+
18
+ if (gOPD) {
19
+ assert.equal(typeof gOPD, 'function', 'descriptors supported');
20
+ // use gOPD like Object.getOwnPropertyDescriptor here
21
+ } else {
22
+ assert.ok(!gOPD, 'descriptors not supported');
23
+ }
24
+ ```
25
+
26
+ [package-url]: https://npmjs.org/package/gopd
27
+ [npm-version-svg]: https://versionbadg.es/ljharb/gopd.svg
28
+ [deps-svg]: https://david-dm.org/ljharb/gopd.svg
29
+ [deps-url]: https://david-dm.org/ljharb/gopd
30
+ [dev-deps-svg]: https://david-dm.org/ljharb/gopd/dev-status.svg
31
+ [dev-deps-url]: https://david-dm.org/ljharb/gopd#info=devDependencies
32
+ [npm-badge-png]: https://nodei.co/npm/gopd.png?downloads=true&stars=true
33
+ [license-image]: https://img.shields.io/npm/l/gopd.svg
34
+ [license-url]: LICENSE
35
+ [downloads-image]: https://img.shields.io/npm/dm/gopd.svg
36
+ [downloads-url]: https://npm-stat.com/charts.html?package=gopd
37
+ [codecov-image]: https://codecov.io/gh/ljharb/gopd/branch/main/graphs/badge.svg
38
+ [codecov-url]: https://app.codecov.io/gh/ljharb/gopd/
39
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/gopd
40
+ [actions-url]: https://github.com/ljharb/gopd/actions
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var GetIntrinsic = require('get-intrinsic');
4
+
5
+ var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
6
+
7
+ if ($gOPD) {
8
+ try {
9
+ $gOPD([], 'length');
10
+ } catch (e) {
11
+ // IE 8 has a broken gOPD
12
+ $gOPD = null;
13
+ }
14
+ }
15
+
16
+ module.exports = $gOPD;
@@ -0,0 +1,71 @@
1
+ {
2
+ "name": "gopd",
3
+ "version": "1.0.1",
4
+ "description": "`Object.getOwnPropertyDescriptor`, but accounts for IE's broken implementation.",
5
+ "main": "index.js",
6
+ "exports": {
7
+ ".": "./index.js",
8
+ "./package.json": "./package.json"
9
+ },
10
+ "sideEffects": false,
11
+ "scripts": {
12
+ "prepack": "npmignore --auto --commentLines=autogenerated",
13
+ "prepublishOnly": "safe-publish-latest",
14
+ "prepublish": "not-in-publish || npm run prepublishOnly",
15
+ "lint": "eslint --ext=js,mjs .",
16
+ "postlint": "evalmd README.md",
17
+ "pretest": "npm run lint",
18
+ "tests-only": "tape 'test/**/*.js'",
19
+ "test": "npm run tests-only",
20
+ "posttest": "aud --production",
21
+ "version": "auto-changelog && git add CHANGELOG.md",
22
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/ljharb/gopd.git"
27
+ },
28
+ "keywords": [
29
+ "ecmascript",
30
+ "javascript",
31
+ "getownpropertydescriptor",
32
+ "property",
33
+ "descriptor"
34
+ ],
35
+ "author": "Jordan Harband <ljharb@gmail.com>",
36
+ "funding": {
37
+ "url": "https://github.com/sponsors/ljharb"
38
+ },
39
+ "license": "MIT",
40
+ "bugs": {
41
+ "url": "https://github.com/ljharb/gopd/issues"
42
+ },
43
+ "homepage": "https://github.com/ljharb/gopd#readme",
44
+ "dependencies": {
45
+ "get-intrinsic": "^1.1.3"
46
+ },
47
+ "devDependencies": {
48
+ "@ljharb/eslint-config": "^21.0.0",
49
+ "aud": "^2.0.1",
50
+ "auto-changelog": "^2.4.0",
51
+ "eslint": "=8.8.0",
52
+ "evalmd": "^0.0.19",
53
+ "in-publish": "^2.0.1",
54
+ "npmignore": "^0.3.0",
55
+ "safe-publish-latest": "^2.0.0",
56
+ "tape": "^5.6.1"
57
+ },
58
+ "auto-changelog": {
59
+ "output": "CHANGELOG.md",
60
+ "template": "keepachangelog",
61
+ "unreleased": false,
62
+ "commitLimit": false,
63
+ "backfillLimit": false,
64
+ "hideCredit": true
65
+ },
66
+ "publishConfig": {
67
+ "ignore": [
68
+ ".github/workflows"
69
+ ]
70
+ }
71
+ }
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+ var gOPD = require('../');
5
+
6
+ test('gOPD', function (t) {
7
+ t.test('supported', { skip: !gOPD }, function (st) {
8
+ st.equal(typeof gOPD, 'function', 'is a function');
9
+
10
+ var obj = { x: 1 };
11
+ st.ok('x' in obj, 'property exists');
12
+
13
+ var desc = gOPD(obj, 'x');
14
+ st.deepEqual(
15
+ desc,
16
+ {
17
+ configurable: true,
18
+ enumerable: true,
19
+ value: 1,
20
+ writable: true
21
+ },
22
+ 'descriptor is as expected'
23
+ );
24
+
25
+ st.end();
26
+ });
27
+
28
+ t.test('not supported', { skip: gOPD }, function (st) {
29
+ st.notOk(gOPD, 'is falsy');
30
+
31
+ st.end();
32
+ });
33
+
34
+ t.end();
35
+ });
@@ -0,0 +1,13 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "func-name-matching": 0,
8
+ "id-length": 0,
9
+ "new-cap": [2, {
10
+ "capIsNewExceptions": ["GetIntrinsic"],
11
+ }],
12
+ },
13
+ }
@@ -0,0 +1,12 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [ljharb]
4
+ patreon: # Replace with a single Patreon username
5
+ open_collective: # Replace with a single Open Collective username
6
+ ko_fi: # Replace with a single Ko-fi username
7
+ tidelift: npm/has-property-descriptors
8
+ community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9
+ liberapay: # Replace with a single Liberapay username
10
+ issuehunt: # Replace with a single IssueHunt username
11
+ otechie: # Replace with a single Otechie username
12
+ custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
@@ -0,0 +1,9 @@
1
+ {
2
+ "all": true,
3
+ "check-coverage": false,
4
+ "reporter": ["text-summary", "text", "html", "json"],
5
+ "exclude": [
6
+ "coverage",
7
+ "test"
8
+ ]
9
+ }
@@ -0,0 +1,35 @@
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
8
+ ## [v1.0.2](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.1...v1.0.2) - 2024-02-12
9
+
10
+ ### Commits
11
+
12
+ - [Refactor] use `es-define-property` [`f93a8c8`](https://github.com/inspect-js/has-property-descriptors/commit/f93a8c85eba70cbceab500f2619fb5cce73a1805)
13
+ - [Dev Deps] update `aud`, `npmignore`, `tape` [`42b0c9d`](https://github.com/inspect-js/has-property-descriptors/commit/42b0c9d1c23e747755f0f2924923c418ea34a9ee)
14
+ - [Deps] update `get-intrinsic` [`35e9b46`](https://github.com/inspect-js/has-property-descriptors/commit/35e9b46a7f14331bf0de98b644dd803676746037)
15
+
16
+ ## [v1.0.1](https://github.com/inspect-js/has-property-descriptors/compare/v1.0.0...v1.0.1) - 2023-10-20
17
+
18
+ ### Commits
19
+
20
+ - [meta] use `npmignore` to autogenerate an npmignore file [`5bbf4da`](https://github.com/inspect-js/has-property-descriptors/commit/5bbf4dae1b58950d87bb3af508bee7513e640868)
21
+ - [actions] update rebase action to use reusable workflow [`3a5585b`](https://github.com/inspect-js/has-property-descriptors/commit/3a5585bf74988f71a8f59e67a07d594e62c51fd8)
22
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `tape` [`e5c1212`](https://github.com/inspect-js/has-property-descriptors/commit/e5c1212048a8fda549794c47863724ca60b89cae)
23
+ - [Dev Deps] update `aud`, `tape` [`e942917`](https://github.com/inspect-js/has-property-descriptors/commit/e942917b6c2f7c090d5623048989cf20d0834ebf)
24
+ - [Deps] update `get-intrinsic` [`f4a44ec`](https://github.com/inspect-js/has-property-descriptors/commit/f4a44ec6d94146fa6c550d3c15c31a2062c83ef4)
25
+ - [Deps] update `get-intrinsic` [`eeb275b`](https://github.com/inspect-js/has-property-descriptors/commit/eeb275b473e5d72ca843b61ca25cfcb06a5d4300)
26
+
27
+ ## v1.0.0 - 2022-04-14
28
+
29
+ ### Commits
30
+
31
+ - Initial implementation, tests [`303559f`](https://github.com/inspect-js/has-property-descriptors/commit/303559f2a72dfe7111573a1aec475ed4a184c35a)
32
+ - Initial commit [`3a7ca2d`](https://github.com/inspect-js/has-property-descriptors/commit/3a7ca2dc49f1fff0279a28bb16265e7615e14749)
33
+ - read me [`dd73dce`](https://github.com/inspect-js/has-property-descriptors/commit/dd73dce09d89d0f7a4a6e3b1e562a506f979a767)
34
+ - npm init [`c1e6557`](https://github.com/inspect-js/has-property-descriptors/commit/c1e655779de632d68cb944c50da6b71bcb7b8c85)
35
+ - Only apps should have lockfiles [`e72f7c6`](https://github.com/inspect-js/has-property-descriptors/commit/e72f7c68de534b2d273ee665f8b18d4ecc7f70b0)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2022 Inspect JS
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,43 @@
1
+ # has-property-descriptors <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
+
3
+ [![github actions][actions-image]][actions-url]
4
+ [![coverage][codecov-image]][codecov-url]
5
+ [![dependency status][deps-svg]][deps-url]
6
+ [![dev dependency status][dev-deps-svg]][dev-deps-url]
7
+ [![License][license-image]][license-url]
8
+ [![Downloads][downloads-image]][downloads-url]
9
+
10
+ [![npm badge][npm-badge-png]][package-url]
11
+
12
+ Does the environment have full property descriptor support? Handles IE 8's broken defineProperty/gOPD.
13
+
14
+ ## Example
15
+
16
+ ```js
17
+ var hasPropertyDescriptors = require('has-property-descriptors');
18
+ var assert = require('assert');
19
+
20
+ assert.equal(hasPropertyDescriptors(), true); // will be `false` in IE 6-8, and ES5 engines
21
+
22
+ // Arrays can not have their length `[[Defined]]` in some engines
23
+ assert.equal(hasPropertyDescriptors.hasArrayLengthDefineBug(), false); // will be `true` in Firefox 4-22, and node v0.6
24
+ ```
25
+
26
+ ## Tests
27
+ Simply clone the repo, `npm install`, and run `npm test`
28
+
29
+ [package-url]: https://npmjs.org/package/has-property-descriptors
30
+ [npm-version-svg]: https://versionbadg.es/inspect-js/has-property-descriptors.svg
31
+ [deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors.svg
32
+ [deps-url]: https://david-dm.org/inspect-js/has-property-descriptors
33
+ [dev-deps-svg]: https://david-dm.org/inspect-js/has-property-descriptors/dev-status.svg
34
+ [dev-deps-url]: https://david-dm.org/inspect-js/has-property-descriptors#info=devDependencies
35
+ [npm-badge-png]: https://nodei.co/npm/has-property-descriptors.png?downloads=true&stars=true
36
+ [license-image]: https://img.shields.io/npm/l/has-property-descriptors.svg
37
+ [license-url]: LICENSE
38
+ [downloads-image]: https://img.shields.io/npm/dm/has-property-descriptors.svg
39
+ [downloads-url]: https://npm-stat.com/charts.html?package=has-property-descriptors
40
+ [codecov-image]: https://codecov.io/gh/inspect-js/has-property-descriptors/branch/main/graphs/badge.svg
41
+ [codecov-url]: https://app.codecov.io/gh/inspect-js/has-property-descriptors/
42
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/inspect-js/has-property-descriptors
43
+ [actions-url]: https://github.com/inspect-js/has-property-descriptors/actions
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ var $defineProperty = require('es-define-property');
4
+
5
+ var hasPropertyDescriptors = function hasPropertyDescriptors() {
6
+ return !!$defineProperty;
7
+ };
8
+
9
+ hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() {
10
+ // node v0.6 has a bug where array lengths can be Set but not Defined
11
+ if (!$defineProperty) {
12
+ return null;
13
+ }
14
+ try {
15
+ return $defineProperty([], 'length', { value: 1 }).length !== 1;
16
+ } catch (e) {
17
+ // In Firefox 4-22, defining length on an array throws an exception.
18
+ return true;
19
+ }
20
+ };
21
+
22
+ module.exports = hasPropertyDescriptors;