node-red-contrib-web-worldmap 5.1.4 → 5.1.6

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 (248) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/README.md +5 -3
  3. package/examples/Moving Icons Demo & Builder.json +2 -2
  4. package/node-red-contrib-web-worldmap-5.1.6.tgz +0 -0
  5. package/node_modules/@types/geojson/README.md +1 -1
  6. package/node_modules/@types/geojson/index.d.ts +36 -2
  7. package/node_modules/@types/geojson/package.json +2 -2
  8. package/node_modules/{call-bind → call-bind-apply-helpers}/.eslintrc +1 -0
  9. package/node_modules/{has-property-descriptors → call-bind-apply-helpers}/.github/FUNDING.yml +1 -1
  10. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  11. package/node_modules/{call-bind → call-bind-apply-helpers}/LICENSE +1 -1
  12. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  13. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  14. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  15. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  16. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  17. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  18. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  19. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  20. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  21. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  22. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  23. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  24. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  25. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  26. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  27. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  28. package/node_modules/call-bound/.eslintrc +13 -0
  29. package/node_modules/{call-bind → call-bound}/.github/FUNDING.yml +1 -1
  30. package/node_modules/call-bound/CHANGELOG.md +42 -0
  31. package/node_modules/{has-property-descriptors → call-bound}/LICENSE +1 -1
  32. package/node_modules/call-bound/README.md +53 -0
  33. package/node_modules/call-bound/index.d.ts +94 -0
  34. package/node_modules/call-bound/index.js +19 -0
  35. package/node_modules/{call-bind → call-bound}/package.json +29 -25
  36. package/node_modules/{call-bind/test/callBound.js → call-bound/test/index.js} +12 -5
  37. package/node_modules/call-bound/tsconfig.json +10 -0
  38. package/node_modules/compression/HISTORY.md +9 -1
  39. package/node_modules/compression/README.md +103 -30
  40. package/node_modules/compression/index.js +55 -13
  41. package/node_modules/compression/package.json +3 -2
  42. package/node_modules/{define-data-property → dunder-proto}/.github/FUNDING.yml +1 -1
  43. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  44. package/node_modules/dunder-proto/LICENSE +21 -0
  45. package/node_modules/dunder-proto/README.md +54 -0
  46. package/node_modules/dunder-proto/get.d.ts +5 -0
  47. package/node_modules/dunder-proto/get.js +30 -0
  48. package/node_modules/{has-proto → dunder-proto}/package.json +34 -36
  49. package/node_modules/dunder-proto/set.d.ts +5 -0
  50. package/node_modules/dunder-proto/set.js +35 -0
  51. package/node_modules/dunder-proto/test/get.js +34 -0
  52. package/node_modules/dunder-proto/test/index.js +4 -0
  53. package/node_modules/dunder-proto/test/set.js +50 -0
  54. package/node_modules/dunder-proto/tsconfig.json +9 -0
  55. package/node_modules/es-define-property/CHANGELOG.md +14 -0
  56. package/node_modules/es-define-property/index.js +1 -3
  57. package/node_modules/es-define-property/package.json +12 -12
  58. package/node_modules/es-define-property/test/index.js +1 -0
  59. package/node_modules/es-define-property/tsconfig.json +2 -42
  60. package/node_modules/es-object-atoms/.eslintrc +16 -0
  61. package/node_modules/{set-function-length → es-object-atoms}/.github/FUNDING.yml +1 -1
  62. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  63. package/node_modules/{define-data-property → es-object-atoms}/LICENSE +1 -1
  64. package/node_modules/es-object-atoms/README.md +63 -0
  65. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  66. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  67. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  68. package/node_modules/es-object-atoms/ToObject.js +10 -0
  69. package/node_modules/es-object-atoms/index.d.ts +3 -0
  70. package/node_modules/es-object-atoms/index.js +4 -0
  71. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  72. package/node_modules/es-object-atoms/isObject.js +6 -0
  73. package/node_modules/es-object-atoms/package.json +80 -0
  74. package/node_modules/es-object-atoms/test/index.js +38 -0
  75. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  76. package/node_modules/get-intrinsic/.eslintrc +4 -0
  77. package/node_modules/get-intrinsic/CHANGELOG.md +43 -0
  78. package/node_modules/get-intrinsic/index.js +40 -21
  79. package/node_modules/get-intrinsic/package.json +24 -20
  80. package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
  81. package/node_modules/get-proto/.eslintrc +10 -0
  82. package/node_modules/{has-proto → get-proto}/.github/FUNDING.yml +1 -1
  83. package/node_modules/get-proto/.nycrc +9 -0
  84. package/node_modules/get-proto/CHANGELOG.md +21 -0
  85. package/node_modules/{has-proto → get-proto}/LICENSE +1 -1
  86. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  87. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  88. package/node_modules/get-proto/README.md +50 -0
  89. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  90. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  91. package/node_modules/get-proto/index.d.ts +5 -0
  92. package/node_modules/get-proto/index.js +27 -0
  93. package/node_modules/{has-property-descriptors → get-proto}/package.json +35 -31
  94. package/node_modules/get-proto/test/index.js +68 -0
  95. package/node_modules/get-proto/tsconfig.json +9 -0
  96. package/node_modules/gopd/CHANGELOG.md +20 -0
  97. package/node_modules/gopd/gOPD.d.ts +1 -0
  98. package/node_modules/gopd/gOPD.js +4 -0
  99. package/node_modules/gopd/index.d.ts +5 -0
  100. package/node_modules/gopd/index.js +2 -3
  101. package/node_modules/gopd/package.json +16 -10
  102. package/node_modules/gopd/test/index.js +2 -1
  103. package/node_modules/has-symbols/CHANGELOG.md +16 -0
  104. package/node_modules/has-symbols/index.d.ts +3 -0
  105. package/node_modules/has-symbols/index.js +1 -0
  106. package/node_modules/has-symbols/package.json +19 -9
  107. package/node_modules/has-symbols/shams.d.ts +3 -0
  108. package/node_modules/has-symbols/shams.js +5 -2
  109. package/node_modules/has-symbols/test/shams/core-js.js +1 -0
  110. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
  111. package/node_modules/has-symbols/test/tests.js +4 -2
  112. package/node_modules/has-symbols/tsconfig.json +10 -0
  113. package/node_modules/http-parser-js/http-parser.d.ts +6 -0
  114. package/node_modules/http-parser-js/http-parser.js +16 -9
  115. package/node_modules/http-parser-js/package.json +1 -1
  116. package/node_modules/math-intrinsics/.eslintrc +16 -0
  117. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  118. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  119. package/node_modules/math-intrinsics/LICENSE +21 -0
  120. package/node_modules/math-intrinsics/README.md +50 -0
  121. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  122. package/node_modules/math-intrinsics/abs.js +4 -0
  123. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  124. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  125. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  126. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  127. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  128. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  129. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  130. package/node_modules/math-intrinsics/floor.js +4 -0
  131. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  132. package/node_modules/math-intrinsics/isFinite.js +12 -0
  133. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  134. package/node_modules/math-intrinsics/isInteger.js +16 -0
  135. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  136. package/node_modules/math-intrinsics/isNaN.js +6 -0
  137. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  138. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  139. package/node_modules/math-intrinsics/max.d.ts +1 -0
  140. package/node_modules/math-intrinsics/max.js +4 -0
  141. package/node_modules/math-intrinsics/min.d.ts +1 -0
  142. package/node_modules/math-intrinsics/min.js +4 -0
  143. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  144. package/node_modules/math-intrinsics/mod.js +9 -0
  145. package/node_modules/math-intrinsics/package.json +86 -0
  146. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  147. package/node_modules/math-intrinsics/pow.js +4 -0
  148. package/node_modules/math-intrinsics/round.d.ts +1 -0
  149. package/node_modules/math-intrinsics/round.js +4 -0
  150. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  151. package/node_modules/math-intrinsics/sign.js +11 -0
  152. package/node_modules/math-intrinsics/test/index.js +192 -0
  153. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  154. package/node_modules/mime-db/HISTORY.md +21 -1
  155. package/node_modules/mime-db/README.md +7 -1
  156. package/node_modules/mime-db/db.json +252 -13
  157. package/node_modules/mime-db/package.json +4 -4
  158. package/node_modules/object-inspect/CHANGELOG.md +8 -0
  159. package/node_modules/object-inspect/index.js +10 -7
  160. package/node_modules/object-inspect/package.json +5 -4
  161. package/node_modules/object-inspect/test/values.js +50 -0
  162. package/node_modules/side-channel/.eslintrc +1 -0
  163. package/node_modules/side-channel/CHANGELOG.md +15 -0
  164. package/node_modules/side-channel/README.md +60 -1
  165. package/node_modules/side-channel/index.d.ts +9 -22
  166. package/node_modules/side-channel/index.js +20 -106
  167. package/node_modules/side-channel/package.json +20 -19
  168. package/node_modules/side-channel/test/index.js +76 -55
  169. package/node_modules/side-channel/tsconfig.json +2 -43
  170. package/node_modules/side-channel-list/.editorconfig +9 -0
  171. package/node_modules/side-channel-list/.eslintrc +11 -0
  172. package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  173. package/node_modules/side-channel-list/CHANGELOG.md +15 -0
  174. package/node_modules/side-channel-list/LICENSE +21 -0
  175. package/node_modules/side-channel-list/README.md +62 -0
  176. package/node_modules/side-channel-list/index.d.ts +13 -0
  177. package/node_modules/side-channel-list/index.js +113 -0
  178. package/node_modules/side-channel-list/list.d.ts +14 -0
  179. package/node_modules/side-channel-list/package.json +77 -0
  180. package/node_modules/side-channel-list/test/index.js +104 -0
  181. package/node_modules/side-channel-list/tsconfig.json +9 -0
  182. package/node_modules/side-channel-map/.editorconfig +9 -0
  183. package/node_modules/side-channel-map/.eslintrc +11 -0
  184. package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  185. package/node_modules/side-channel-map/.nycrc +13 -0
  186. package/node_modules/side-channel-map/CHANGELOG.md +22 -0
  187. package/node_modules/side-channel-map/LICENSE +21 -0
  188. package/node_modules/side-channel-map/README.md +62 -0
  189. package/node_modules/side-channel-map/index.d.ts +15 -0
  190. package/node_modules/side-channel-map/index.js +68 -0
  191. package/node_modules/side-channel-map/package.json +80 -0
  192. package/node_modules/side-channel-map/test/index.js +114 -0
  193. package/node_modules/side-channel-map/tsconfig.json +9 -0
  194. package/node_modules/side-channel-weakmap/.editorconfig +9 -0
  195. package/node_modules/side-channel-weakmap/.eslintrc +12 -0
  196. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  197. package/node_modules/side-channel-weakmap/.nycrc +13 -0
  198. package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  199. package/node_modules/side-channel-weakmap/LICENSE +21 -0
  200. package/node_modules/side-channel-weakmap/README.md +62 -0
  201. package/node_modules/side-channel-weakmap/index.d.ts +15 -0
  202. package/node_modules/side-channel-weakmap/index.js +84 -0
  203. package/node_modules/side-channel-weakmap/package.json +87 -0
  204. package/node_modules/side-channel-weakmap/test/index.js +114 -0
  205. package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  206. package/package.json +2 -2
  207. package/worldmap/worldmap.js +18 -13
  208. package/worldmap.html +2 -2
  209. package/node_modules/call-bind/.eslintignore +0 -1
  210. package/node_modules/call-bind/CHANGELOG.md +0 -93
  211. package/node_modules/call-bind/README.md +0 -64
  212. package/node_modules/call-bind/callBound.js +0 -15
  213. package/node_modules/call-bind/index.js +0 -35
  214. package/node_modules/call-bind/test/index.js +0 -80
  215. package/node_modules/define-data-property/.eslintrc +0 -24
  216. package/node_modules/define-data-property/CHANGELOG.md +0 -70
  217. package/node_modules/define-data-property/README.md +0 -67
  218. package/node_modules/define-data-property/index.d.ts +0 -12
  219. package/node_modules/define-data-property/index.js +0 -56
  220. package/node_modules/define-data-property/package.json +0 -106
  221. package/node_modules/define-data-property/test/index.js +0 -392
  222. package/node_modules/define-data-property/tsconfig.json +0 -59
  223. package/node_modules/has-property-descriptors/.eslintrc +0 -13
  224. package/node_modules/has-property-descriptors/CHANGELOG.md +0 -35
  225. package/node_modules/has-property-descriptors/README.md +0 -43
  226. package/node_modules/has-property-descriptors/index.js +0 -22
  227. package/node_modules/has-property-descriptors/test/index.js +0 -57
  228. package/node_modules/has-proto/CHANGELOG.md +0 -38
  229. package/node_modules/has-proto/README.md +0 -38
  230. package/node_modules/has-proto/index.d.ts +0 -3
  231. package/node_modules/has-proto/index.js +0 -15
  232. package/node_modules/has-proto/test/index.js +0 -19
  233. package/node_modules/has-proto/tsconfig.json +0 -49
  234. package/node_modules/set-function-length/.eslintrc +0 -27
  235. package/node_modules/set-function-length/CHANGELOG.md +0 -70
  236. package/node_modules/set-function-length/LICENSE +0 -21
  237. package/node_modules/set-function-length/README.md +0 -56
  238. package/node_modules/set-function-length/env.d.ts +0 -9
  239. package/node_modules/set-function-length/env.js +0 -25
  240. package/node_modules/set-function-length/index.d.ts +0 -7
  241. package/node_modules/set-function-length/index.js +0 -42
  242. package/node_modules/set-function-length/package.json +0 -102
  243. /package/node_modules/{call-bind → call-bind-apply-helpers}/.nycrc +0 -0
  244. /package/node_modules/{has-property-descriptors → call-bound}/.nycrc +0 -0
  245. /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
  246. /package/node_modules/{define-data-property → dunder-proto}/.nycrc +0 -0
  247. /package/node_modules/{set-function-length → gopd}/tsconfig.json +0 -0
  248. /package/node_modules/{set-function-length → side-channel-list}/.nycrc +0 -0
@@ -1,10 +1,12 @@
1
1
  'use strict';
2
2
 
3
+ /** @type {import('./shams')} */
3
4
  /* eslint complexity: [2, 18], max-statements: [2, 33] */
4
5
  module.exports = function hasSymbols() {
5
6
  if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
6
7
  if (typeof Symbol.iterator === 'symbol') { return true; }
7
8
 
9
+ /** @type {{ [k in symbol]?: unknown }} */
8
10
  var obj = {};
9
11
  var sym = Symbol('test');
10
12
  var symObj = Object(sym);
@@ -23,7 +25,7 @@ module.exports = function hasSymbols() {
23
25
 
24
26
  var symVal = 42;
25
27
  obj[sym] = symVal;
26
- for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
28
+ for (var _ in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
27
29
  if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
28
30
 
29
31
  if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
@@ -34,7 +36,8 @@ module.exports = function hasSymbols() {
34
36
  if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
35
37
 
36
38
  if (typeof Object.getOwnPropertyDescriptor === 'function') {
37
- var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
39
+ // eslint-disable-next-line no-extra-parens
40
+ var descriptor = /** @type {PropertyDescriptor} */ (Object.getOwnPropertyDescriptor(obj, sym));
38
41
  if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
39
42
  }
40
43
 
@@ -8,6 +8,7 @@ if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
8
8
  t.equal(typeof Symbol(), 'symbol');
9
9
  t.end();
10
10
  });
11
+ // @ts-expect-error TS is stupid and doesn't know about top level return
11
12
  return;
12
13
  }
13
14
 
@@ -8,6 +8,7 @@ if (typeof Symbol === 'function' && typeof Symbol() === 'symbol') {
8
8
  t.equal(typeof Symbol(), 'symbol');
9
9
  t.end();
10
10
  });
11
+ // @ts-expect-error TS is stupid and doesn't know about top level return
11
12
  return;
12
13
  }
13
14
 
@@ -1,5 +1,6 @@
1
1
  'use strict';
2
2
 
3
+ /** @type {(t: import('tape').Test) => false | void} */
3
4
  // eslint-disable-next-line consistent-return
4
5
  module.exports = function runSymbolTests(t) {
5
6
  t.equal(typeof Symbol, 'function', 'global Symbol is a function');
@@ -31,6 +32,7 @@ module.exports = function runSymbolTests(t) {
31
32
 
32
33
  t.equal(typeof Object.getOwnPropertySymbols, 'function', 'Object.getOwnPropertySymbols is a function');
33
34
 
35
+ /** @type {{ [k in symbol]?: unknown }} */
34
36
  var obj = {};
35
37
  var sym = Symbol('test');
36
38
  var symObj = Object(sym);
@@ -40,8 +42,8 @@ module.exports = function runSymbolTests(t) {
40
42
 
41
43
  var symVal = 42;
42
44
  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
+ // eslint-disable-next-line no-restricted-syntax, no-unused-vars
46
+ for (var _ in obj) { t.fail('symbol property key was found in for..in of object'); }
45
47
 
46
48
  t.deepEqual(Object.keys(obj), [], 'no enumerable own keys on symbol-valued object');
47
49
  t.deepEqual(Object.getOwnPropertyNames(obj), [], 'no own names on symbol-valued object');
@@ -0,0 +1,10 @@
1
+ {
2
+ "extends": "@ljharb/tsconfig",
3
+ "compilerOptions": {
4
+ "target": "ES2021",
5
+ "maxNodeModuleJsDepth": 0,
6
+ },
7
+ "exclude": [
8
+ "coverage"
9
+ ]
10
+ }
@@ -92,6 +92,12 @@ declare class HTTPParserJS {
92
92
  [HTTPParser.kOnBody]: OnBodyParser
93
93
  [HTTPParser.kOnMessageComplete]: noop
94
94
 
95
+ /**
96
+ * Max number of bytes that will be parsed as headers, 80kb by default
97
+ * @default 81920
98
+ */
99
+ maxHeaderSize: number
100
+
95
101
  reinitialize: HTTPParserConstructor
96
102
  close: noop
97
103
  pause: noop
@@ -1,10 +1,10 @@
1
1
  /*jshint node:true */
2
2
 
3
- var assert = require('assert');
4
-
5
3
  exports.HTTPParser = HTTPParser;
6
4
  function HTTPParser(type) {
7
- assert.ok(type === HTTPParser.REQUEST || type === HTTPParser.RESPONSE || type === undefined);
5
+ if (type !== undefined && type !== HTTPParser.REQUEST && type !== HTTPParser.RESPONSE) {
6
+ throw new Error('type must be REQUEST or RESPONSE');
7
+ }
8
8
  if (type === undefined) {
9
9
  // Node v12+
10
10
  } else {
@@ -13,7 +13,9 @@ function HTTPParser(type) {
13
13
  this.maxHeaderSize=HTTPParser.maxHeaderSize
14
14
  }
15
15
  HTTPParser.prototype.initialize = function (type, async_resource) {
16
- assert.ok(type === HTTPParser.REQUEST || type === HTTPParser.RESPONSE);
16
+ if (type !== HTTPParser.REQUEST && type !== HTTPParser.RESPONSE) {
17
+ throw new Error('type must be REQUEST or RESPONSE');
18
+ }
17
19
  this.type = type;
18
20
  this.state = type + '_LINE';
19
21
  this.info = {
@@ -98,6 +100,7 @@ HTTPParser.prototype.reinitialize = HTTPParser;
98
100
  HTTPParser.prototype.close =
99
101
  HTTPParser.prototype.pause =
100
102
  HTTPParser.prototype.resume =
103
+ HTTPParser.prototype.remove =
101
104
  HTTPParser.prototype.free = function () {};
102
105
  HTTPParser.prototype._compatMode0_11 = false;
103
106
  HTTPParser.prototype.getAsyncId = function() { return 0; };
@@ -392,7 +395,8 @@ HTTPParser.prototype.BODY_CHUNKHEAD = function () {
392
395
 
393
396
  HTTPParser.prototype.BODY_CHUNK = function () {
394
397
  var length = Math.min(this.end - this.offset, this.body_bytes);
395
- this.userCall()(this[kOnBody](this.chunk, this.offset, length));
398
+ // 0, length are for backwards compatibility. See: https://github.com/creationix/http-parser-js/pull/98
399
+ this.userCall()(this[kOnBody](this.chunk.slice(this.offset, this.offset + length), 0, length));
396
400
  this.offset += length;
397
401
  this.body_bytes -= length;
398
402
  if (!this.body_bytes) {
@@ -405,7 +409,9 @@ HTTPParser.prototype.BODY_CHUNKEMPTYLINE = function () {
405
409
  if (line === undefined) {
406
410
  return;
407
411
  }
408
- assert.equal(line, '');
412
+ if (line !== '') {
413
+ throw new Error('Expected empty line');
414
+ }
409
415
  this.state = 'BODY_CHUNKHEAD';
410
416
  };
411
417
 
@@ -425,14 +431,15 @@ HTTPParser.prototype.BODY_CHUNKTRAILERS = function () {
425
431
  };
426
432
 
427
433
  HTTPParser.prototype.BODY_RAW = function () {
428
- var length = this.end - this.offset;
429
- this.userCall()(this[kOnBody](this.chunk, this.offset, length));
434
+ // 0, length are for backwards compatibility. See: https://github.com/creationix/http-parser-js/pull/98
435
+ this.userCall()(this[kOnBody](this.chunk.slice(this.offset, this.end), 0, this.end - this.offset));
430
436
  this.offset = this.end;
431
437
  };
432
438
 
433
439
  HTTPParser.prototype.BODY_SIZED = function () {
434
440
  var length = Math.min(this.end - this.offset, this.body_bytes);
435
- this.userCall()(this[kOnBody](this.chunk, this.offset, length));
441
+ // 0, length are for backwards compatibility. See: https://github.com/creationix/http-parser-js/pull/98
442
+ this.userCall()(this[kOnBody](this.chunk.slice(this.offset, this.offset + length), 0, length));
436
443
  this.offset += length;
437
444
  this.body_bytes -= length;
438
445
  if (!this.body_bytes) {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "http-parser-js",
3
- "version": "0.5.8",
3
+ "version": "0.5.10",
4
4
  "description": "A pure JS HTTP parser for node.",
5
5
  "main": "http-parser.js",
6
6
  "types": "http-parser.d.ts",
@@ -0,0 +1,16 @@
1
+ {
2
+ "root": true,
3
+
4
+ "extends": "@ljharb",
5
+
6
+ "rules": {
7
+ "eqeqeq": ["error", "allow-null"],
8
+ "id-length": "off",
9
+ "new-cap": ["error", {
10
+ "capIsNewExceptions": [
11
+ "RequireObjectCoercible",
12
+ "ToObject",
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/math-intrinsics
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 a single custom sponsorship URL
@@ -0,0 +1,24 @@
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.1.0](https://github.com/es-shims/math-intrinsics/compare/v1.0.0...v1.1.0) - 2024-12-18
9
+
10
+ ### Commits
11
+
12
+ - [New] add `round` [`7cfb044`](https://github.com/es-shims/math-intrinsics/commit/7cfb04460c0fbdf1ca101eecbac3f59d11994130)
13
+ - [Tests] add attw [`e96be8f`](https://github.com/es-shims/math-intrinsics/commit/e96be8fbf58449eafe976446a0470e6ea561ad8d)
14
+ - [Dev Deps] update `@types/tape` [`30d0023`](https://github.com/es-shims/math-intrinsics/commit/30d00234ce8a3fa0094a61cd55d6686eb91e36ec)
15
+
16
+ ## v1.0.0 - 2024-12-11
17
+
18
+ ### Commits
19
+
20
+ - Initial implementation, tests, readme, types [`b898caa`](https://github.com/es-shims/math-intrinsics/commit/b898caae94e9994a94a42b8740f7bbcfd0a868fe)
21
+ - Initial commit [`02745b0`](https://github.com/es-shims/math-intrinsics/commit/02745b03a62255af8a332771987b55d127538d9c)
22
+ - [New] add `constants/maxArrayLength`, `mod` [`b978178`](https://github.com/es-shims/math-intrinsics/commit/b978178a57685bd23ed1c7efe2137f3784f5fcc5)
23
+ - npm init [`a39fc57`](https://github.com/es-shims/math-intrinsics/commit/a39fc57e5639a645d0bd52a0dc56202480223be2)
24
+ - Only apps should have lockfiles [`9451580`](https://github.com/es-shims/math-intrinsics/commit/94515800fb34db4f3cc7e99290042d45609ac7bd)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2024 ECMAScript Shims
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,50 @@
1
+ # math-intrinsics <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
+ ES Math-related intrinsics and helpers, robustly cached.
11
+
12
+ - `abs`
13
+ - `floor`
14
+ - `isFinite`
15
+ - `isInteger`
16
+ - `isNaN`
17
+ - `isNegativeZero`
18
+ - `max`
19
+ - `min`
20
+ - `mod`
21
+ - `pow`
22
+ - `round`
23
+ - `sign`
24
+ - `constants/maxArrayLength`
25
+ - `constants/maxSafeInteger`
26
+ - `constants/maxValue`
27
+
28
+
29
+ ## Tests
30
+ Simply clone the repo, `npm install`, and run `npm test`
31
+
32
+ ## Security
33
+
34
+ Please email [@ljharb](https://github.com/ljharb) or see https://tidelift.com/security if you have a potential security vulnerability to report.
35
+
36
+ [package-url]: https://npmjs.org/package/math-intrinsics
37
+ [npm-version-svg]: https://versionbadg.es/es-shims/math-intrinsics.svg
38
+ [deps-svg]: https://david-dm.org/es-shims/math-intrinsics.svg
39
+ [deps-url]: https://david-dm.org/es-shims/math-intrinsics
40
+ [dev-deps-svg]: https://david-dm.org/es-shims/math-intrinsics/dev-status.svg
41
+ [dev-deps-url]: https://david-dm.org/es-shims/math-intrinsics#info=devDependencies
42
+ [npm-badge-png]: https://nodei.co/npm/math-intrinsics.png?downloads=true&stars=true
43
+ [license-image]: https://img.shields.io/npm/l/math-intrinsics.svg
44
+ [license-url]: LICENSE
45
+ [downloads-image]: https://img.shields.io/npm/dm/es-object.svg
46
+ [downloads-url]: https://npm-stat.com/charts.html?package=math-intrinsics
47
+ [codecov-image]: https://codecov.io/gh/es-shims/math-intrinsics/branch/main/graphs/badge.svg
48
+ [codecov-url]: https://app.codecov.io/gh/es-shims/math-intrinsics/
49
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/math-intrinsics
50
+ [actions-url]: https://github.com/es-shims/math-intrinsics/actions
@@ -0,0 +1 @@
1
+ export = Math.abs;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./abs')} */
4
+ module.exports = Math.abs;
@@ -0,0 +1,3 @@
1
+ declare const MAX_ARRAY_LENGTH: 4294967295;
2
+
3
+ export = MAX_ARRAY_LENGTH;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./maxArrayLength')} */
4
+ module.exports = 4294967295; // Math.pow(2, 32) - 1;
@@ -0,0 +1,3 @@
1
+ declare const MAX_SAFE_INTEGER: 9007199254740991;
2
+
3
+ export = MAX_SAFE_INTEGER;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./maxSafeInteger')} */
4
+ // eslint-disable-next-line no-extra-parens
5
+ module.exports = /** @type {import('./maxSafeInteger')} */ (Number.MAX_SAFE_INTEGER) || 9007199254740991; // Math.pow(2, 53) - 1;
@@ -0,0 +1,3 @@
1
+ declare const MAX_VALUE: 1.7976931348623157e+308;
2
+
3
+ export = MAX_VALUE;
@@ -0,0 +1,5 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./maxValue')} */
4
+ // eslint-disable-next-line no-extra-parens
5
+ module.exports = /** @type {import('./maxValue')} */ (Number.MAX_VALUE) || 1.7976931348623157e+308;
@@ -0,0 +1 @@
1
+ export = Math.floor;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./floor')} */
4
+ module.exports = Math.floor;
@@ -0,0 +1,3 @@
1
+ declare function isFinite(x: unknown): x is number | bigint;
2
+
3
+ export = isFinite;
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ var $isNaN = require('./isNaN');
4
+
5
+ /** @type {import('./isFinite')} */
6
+ module.exports = function isFinite(x) {
7
+ return (typeof x === 'number' || typeof x === 'bigint')
8
+ && !$isNaN(x)
9
+ && x !== Infinity
10
+ && x !== -Infinity;
11
+ };
12
+
@@ -0,0 +1,3 @@
1
+ declare function isInteger(argument: unknown): argument is number;
2
+
3
+ export = isInteger;
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ var $abs = require('./abs');
4
+ var $floor = require('./floor');
5
+
6
+ var $isNaN = require('./isNaN');
7
+ var $isFinite = require('./isFinite');
8
+
9
+ /** @type {import('./isInteger')} */
10
+ module.exports = function isInteger(argument) {
11
+ if (typeof argument !== 'number' || $isNaN(argument) || !$isFinite(argument)) {
12
+ return false;
13
+ }
14
+ var absValue = $abs(argument);
15
+ return $floor(absValue) === absValue;
16
+ };
@@ -0,0 +1 @@
1
+ export = Number.isNaN;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./isNaN')} */
4
+ module.exports = Number.isNaN || function isNaN(a) {
5
+ return a !== a;
6
+ };
@@ -0,0 +1,3 @@
1
+ declare function isNegativeZero(x: unknown): boolean;
2
+
3
+ export = isNegativeZero;
@@ -0,0 +1,6 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./isNegativeZero')} */
4
+ module.exports = function isNegativeZero(x) {
5
+ return x === 0 && 1 / x === 1 / -0;
6
+ };
@@ -0,0 +1 @@
1
+ export = Math.max;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./max')} */
4
+ module.exports = Math.max;
@@ -0,0 +1 @@
1
+ export = Math.min;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./min')} */
4
+ module.exports = Math.min;
@@ -0,0 +1,3 @@
1
+ declare function mod(number: number, modulo: number): number;
2
+
3
+ export = mod;
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ var $floor = require('./floor');
4
+
5
+ /** @type {import('./mod')} */
6
+ module.exports = function mod(number, modulo) {
7
+ var remain = number % modulo;
8
+ return $floor(remain >= 0 ? remain : remain + modulo);
9
+ };
@@ -0,0 +1,86 @@
1
+ {
2
+ "name": "math-intrinsics",
3
+ "version": "1.1.0",
4
+ "description": "ES Math-related intrinsics and helpers, robustly cached.",
5
+ "main": false,
6
+ "exports": {
7
+ "./abs": "./abs.js",
8
+ "./floor": "./floor.js",
9
+ "./isFinite": "./isFinite.js",
10
+ "./isInteger": "./isInteger.js",
11
+ "./isNaN": "./isNaN.js",
12
+ "./isNegativeZero": "./isNegativeZero.js",
13
+ "./max": "./max.js",
14
+ "./min": "./min.js",
15
+ "./mod": "./mod.js",
16
+ "./pow": "./pow.js",
17
+ "./sign": "./sign.js",
18
+ "./round": "./round.js",
19
+ "./constants/maxArrayLength": "./constants/maxArrayLength.js",
20
+ "./constants/maxSafeInteger": "./constants/maxSafeInteger.js",
21
+ "./constants/maxValue": "./constants/maxValue.js",
22
+ "./package.json": "./package.json"
23
+ },
24
+ "sideEffects": false,
25
+ "scripts": {
26
+ "prepack": "npmignore --auto --commentLines=autogenerated",
27
+ "prepublishOnly": "safe-publish-latest",
28
+ "prepublish": "not-in-publish || npm run prepublishOnly",
29
+ "pretest": "npm run lint",
30
+ "test": "npm run tests-only",
31
+ "tests-only": "nyc tape 'test/**/*.js'",
32
+ "posttest": "npx npm@'>= 10.2' audit --production",
33
+ "prelint": "evalmd README.md && eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git' | grep -v dist/)",
34
+ "lint": "eslint --ext=js,mjs .",
35
+ "postlint": "tsc && attw -P",
36
+ "version": "auto-changelog && git add CHANGELOG.md",
37
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "git+https://github.com/es-shims/math-intrinsics.git"
42
+ },
43
+ "author": "Jordan Harband <ljharb@gmail.com>",
44
+ "license": "MIT",
45
+ "bugs": {
46
+ "url": "https://github.com/es-shims/math-intrinsics/issues"
47
+ },
48
+ "homepage": "https://github.com/es-shims/math-intrinsics#readme",
49
+ "devDependencies": {
50
+ "@arethetypeswrong/cli": "^0.17.1",
51
+ "@ljharb/eslint-config": "^21.1.1",
52
+ "@ljharb/tsconfig": "^0.2.2",
53
+ "@types/for-each": "^0.3.3",
54
+ "@types/object-inspect": "^1.13.0",
55
+ "@types/tape": "^5.8.0",
56
+ "auto-changelog": "^2.5.0",
57
+ "eclint": "^2.8.1",
58
+ "es-value-fixtures": "^1.5.0",
59
+ "eslint": "^8.8.0",
60
+ "evalmd": "^0.0.19",
61
+ "for-each": "^0.3.3",
62
+ "in-publish": "^2.0.1",
63
+ "npmignore": "^0.3.1",
64
+ "nyc": "^10.3.2",
65
+ "object-inspect": "^1.13.3",
66
+ "safe-publish-latest": "^2.0.0",
67
+ "tape": "^5.9.0",
68
+ "typescript": "next"
69
+ },
70
+ "auto-changelog": {
71
+ "output": "CHANGELOG.md",
72
+ "template": "keepachangelog",
73
+ "unreleased": false,
74
+ "commitLimit": false,
75
+ "backfillLimit": false,
76
+ "hideCredit": true
77
+ },
78
+ "publishConfig": {
79
+ "ignore": [
80
+ ".github/workflows"
81
+ ]
82
+ },
83
+ "engines": {
84
+ "node": ">= 0.4"
85
+ }
86
+ }
@@ -0,0 +1 @@
1
+ export = Math.pow;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./pow')} */
4
+ module.exports = Math.pow;
@@ -0,0 +1 @@
1
+ export = Math.round;
@@ -0,0 +1,4 @@
1
+ 'use strict';
2
+
3
+ /** @type {import('./round')} */
4
+ module.exports = Math.round;
@@ -0,0 +1,3 @@
1
+ declare function sign(x: number): number;
2
+
3
+ export = sign;
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ var $isNaN = require('./isNaN');
4
+
5
+ /** @type {import('./sign')} */
6
+ module.exports = function sign(number) {
7
+ if ($isNaN(number) || number === 0) {
8
+ return number;
9
+ }
10
+ return number < 0 ? -1 : +1;
11
+ };