meteor-node-stubs 1.2.17 → 1.2.19

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 (460) hide show
  1. package/node_modules/@meteorjs/browserify-sign/browser/sign.js +1 -1
  2. package/node_modules/@meteorjs/browserify-sign/browser/verify.js +1 -1
  3. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/jodid.js +82 -0
  4. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/secp256k1.js +41 -0
  5. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/index.js +153 -0
  6. package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/package.json +21 -0
  7. package/node_modules/@meteorjs/browserify-sign/elliptic/dist/.gitkeep +0 -0
  8. package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.js +8961 -0
  9. package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.min.js +1 -0
  10. package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic.js +1 -1
  11. package/node_modules/@meteorjs/browserify-sign/elliptic/test/api-test.js +20 -0
  12. package/node_modules/@meteorjs/browserify-sign/elliptic/test/curve-test.js +357 -0
  13. package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdh-test.js +43 -0
  14. package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdsa-test.js +547 -0
  15. package/node_modules/@meteorjs/browserify-sign/elliptic/test/ed25519-test.js +138 -0
  16. package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
  17. package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/sign.input +1024 -0
  18. package/node_modules/@meteorjs/browserify-sign/elliptic/test/index.js +10 -0
  19. package/node_modules/@meteorjs/browserify-sign/elliptic/test/unittests.html +39 -0
  20. package/node_modules/@meteorjs/browserify-sign/package.json +22 -5
  21. package/node_modules/@meteorjs/create-ecdh/browser.js +1 -1
  22. package/node_modules/@meteorjs/create-ecdh/elliptic/README.md +238 -0
  23. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/jodid.js +82 -0
  24. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/secp256k1.js +41 -0
  25. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/index.js +153 -0
  26. package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/package.json +21 -0
  27. package/node_modules/@meteorjs/create-ecdh/elliptic/dist/.gitkeep +0 -0
  28. package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.js +8961 -0
  29. package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.min.js +1 -0
  30. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/base.js +381 -0
  31. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/edwards.js +435 -0
  32. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/index.js +8 -0
  33. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/mont.js +178 -0
  34. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/short.js +938 -0
  35. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curves.js +206 -0
  36. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/index.js +278 -0
  37. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/key.js +121 -0
  38. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/signature.js +176 -0
  39. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/index.js +121 -0
  40. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/key.js +95 -0
  41. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/signature.js +66 -0
  42. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/precomputed/secp256k1.js +780 -0
  43. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/utils.js +122 -0
  44. package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic.js +13 -0
  45. package/node_modules/@meteorjs/create-ecdh/elliptic/test/api-test.js +20 -0
  46. package/node_modules/@meteorjs/create-ecdh/elliptic/test/curve-test.js +357 -0
  47. package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdh-test.js +43 -0
  48. package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdsa-test.js +547 -0
  49. package/node_modules/@meteorjs/create-ecdh/elliptic/test/ed25519-test.js +138 -0
  50. package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
  51. package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/sign.input +1024 -0
  52. package/node_modules/@meteorjs/create-ecdh/elliptic/test/index.js +10 -0
  53. package/node_modules/@meteorjs/create-ecdh/elliptic/test/unittests.html +39 -0
  54. package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/lib/bn.js +1 -0
  55. package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/package.json +1 -1
  56. package/node_modules/@meteorjs/create-ecdh/package.json +23 -5
  57. package/node_modules/asn1.js/node_modules/bn.js/lib/bn.js +6 -5
  58. package/node_modules/asn1.js/node_modules/bn.js/package.json +1 -1
  59. package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo.js +65 -0
  60. package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  61. package/node_modules/available-typed-arrays/.eslintrc +0 -4
  62. package/node_modules/available-typed-arrays/CHANGELOG.md +21 -0
  63. package/node_modules/available-typed-arrays/README.md +16 -13
  64. package/node_modules/available-typed-arrays/index.d.ts +8 -0
  65. package/node_modules/available-typed-arrays/index.js +4 -14
  66. package/node_modules/available-typed-arrays/package.json +26 -15
  67. package/node_modules/available-typed-arrays/tsconfig.json +49 -0
  68. package/node_modules/bn.js/README.md +11 -5
  69. package/node_modules/bn.js/lib/bn.js +6 -5
  70. package/node_modules/bn.js/package.json +1 -1
  71. package/node_modules/browserify-rsa/CHANGELOG.md +98 -0
  72. package/node_modules/browserify-rsa/README.md +0 -2
  73. package/node_modules/browserify-rsa/index.js +31 -28
  74. package/node_modules/browserify-rsa/package.json +64 -29
  75. package/node_modules/call-bind/CHANGELOG.md +13 -0
  76. package/node_modules/call-bind/index.js +6 -17
  77. package/node_modules/call-bind/package.json +14 -16
  78. package/node_modules/call-bind/test/index.js +4 -10
  79. package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
  80. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
  81. package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
  82. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
  83. package/node_modules/{has-proto → call-bind-apply-helpers}/LICENSE +1 -1
  84. package/node_modules/call-bind-apply-helpers/README.md +62 -0
  85. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
  86. package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
  87. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
  88. package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
  89. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
  90. package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
  91. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
  92. package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
  93. package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
  94. package/node_modules/call-bind-apply-helpers/index.js +15 -0
  95. package/node_modules/call-bind-apply-helpers/package.json +85 -0
  96. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
  97. package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
  98. package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
  99. package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
  100. package/node_modules/call-bound/.eslintrc +13 -0
  101. package/node_modules/call-bound/.github/FUNDING.yml +12 -0
  102. package/node_modules/call-bound/.nycrc +9 -0
  103. package/node_modules/call-bound/CHANGELOG.md +42 -0
  104. package/node_modules/{@meteorjs/browserify-sign/node_modules/bn.js → call-bound}/LICENSE +3 -1
  105. package/node_modules/call-bound/README.md +53 -0
  106. package/node_modules/call-bound/index.d.ts +94 -0
  107. package/node_modules/call-bound/index.js +19 -0
  108. package/node_modules/call-bound/package.json +99 -0
  109. package/node_modules/call-bound/test/index.js +61 -0
  110. package/node_modules/call-bound/tsconfig.json +10 -0
  111. package/node_modules/cipher-base/.eslintrc +24 -1
  112. package/node_modules/cipher-base/.github/FUNDING.yml +12 -0
  113. package/node_modules/cipher-base/CHANGELOG.md +66 -0
  114. package/node_modules/cipher-base/index.js +145 -77
  115. package/node_modules/cipher-base/package.json +60 -30
  116. package/node_modules/cipher-base/test/index.js +221 -0
  117. package/node_modules/des.js/lib/des/cipher.js +1 -0
  118. package/node_modules/des.js/lib/des/des.js +8 -0
  119. package/node_modules/des.js/package.json +3 -4
  120. package/node_modules/des.js/test/cbc-test.js +5 -5
  121. package/node_modules/des.js/test/des-test.js +9 -9
  122. package/node_modules/des.js/test/ede-test.js +39 -6
  123. package/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js +6 -5
  124. package/node_modules/diffie-hellman/node_modules/bn.js/package.json +1 -1
  125. package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js +65 -0
  126. package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  127. package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
  128. package/node_modules/dunder-proto/.nycrc +13 -0
  129. package/node_modules/dunder-proto/CHANGELOG.md +24 -0
  130. package/node_modules/{@meteorjs/crypto-browserify/node_modules/hash-base → dunder-proto}/LICENSE +6 -6
  131. package/node_modules/dunder-proto/README.md +54 -0
  132. package/node_modules/dunder-proto/get.d.ts +5 -0
  133. package/node_modules/dunder-proto/get.js +30 -0
  134. package/node_modules/dunder-proto/package.json +76 -0
  135. package/node_modules/dunder-proto/set.d.ts +5 -0
  136. package/node_modules/dunder-proto/set.js +35 -0
  137. package/node_modules/dunder-proto/test/get.js +34 -0
  138. package/node_modules/dunder-proto/test/index.js +4 -0
  139. package/node_modules/dunder-proto/test/set.js +50 -0
  140. package/node_modules/dunder-proto/tsconfig.json +9 -0
  141. package/node_modules/es-define-property/CHANGELOG.md +14 -0
  142. package/node_modules/es-define-property/index.js +1 -3
  143. package/node_modules/es-define-property/package.json +12 -12
  144. package/node_modules/es-define-property/test/index.js +1 -0
  145. package/node_modules/es-define-property/tsconfig.json +2 -42
  146. package/node_modules/es-object-atoms/.eslintrc +16 -0
  147. package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
  148. package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
  149. package/node_modules/{elliptic/node_modules/bn.js → es-object-atoms}/LICENSE +3 -1
  150. package/node_modules/es-object-atoms/README.md +63 -0
  151. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
  152. package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
  153. package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
  154. package/node_modules/es-object-atoms/ToObject.js +10 -0
  155. package/node_modules/es-object-atoms/index.d.ts +3 -0
  156. package/node_modules/es-object-atoms/index.js +4 -0
  157. package/node_modules/es-object-atoms/isObject.d.ts +3 -0
  158. package/node_modules/es-object-atoms/isObject.js +6 -0
  159. package/node_modules/es-object-atoms/package.json +80 -0
  160. package/node_modules/es-object-atoms/test/index.js +38 -0
  161. package/node_modules/es-object-atoms/tsconfig.json +6 -0
  162. package/node_modules/for-each/.eslintrc +16 -2
  163. package/node_modules/{has-proto → for-each}/.github/FUNDING.yml +1 -1
  164. package/node_modules/for-each/.github/SECURITY.md +3 -0
  165. package/node_modules/for-each/.nycrc +8 -0
  166. package/node_modules/for-each/CHANGELOG.md +107 -0
  167. package/node_modules/for-each/README.md +0 -4
  168. package/node_modules/for-each/index.d.ts +35 -0
  169. package/node_modules/for-each/index.js +11 -4
  170. package/node_modules/for-each/package.json +47 -36
  171. package/node_modules/for-each/test/test.js +54 -12
  172. package/node_modules/for-each/tsconfig.json +8 -0
  173. package/node_modules/get-intrinsic/.eslintrc +4 -0
  174. package/node_modules/get-intrinsic/CHANGELOG.md +43 -0
  175. package/node_modules/get-intrinsic/index.js +40 -21
  176. package/node_modules/get-intrinsic/package.json +24 -20
  177. package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
  178. package/node_modules/get-proto/.eslintrc +10 -0
  179. package/node_modules/get-proto/.github/FUNDING.yml +12 -0
  180. package/node_modules/get-proto/.nycrc +9 -0
  181. package/node_modules/get-proto/CHANGELOG.md +21 -0
  182. package/node_modules/get-proto/LICENSE +21 -0
  183. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
  184. package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
  185. package/node_modules/get-proto/README.md +50 -0
  186. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
  187. package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
  188. package/node_modules/get-proto/index.d.ts +5 -0
  189. package/node_modules/get-proto/index.js +27 -0
  190. package/node_modules/{has-proto → get-proto}/package.json +33 -26
  191. package/node_modules/get-proto/test/index.js +68 -0
  192. package/node_modules/get-proto/tsconfig.json +9 -0
  193. package/node_modules/gopd/CHANGELOG.md +20 -0
  194. package/node_modules/gopd/gOPD.d.ts +1 -0
  195. package/node_modules/gopd/gOPD.js +4 -0
  196. package/node_modules/gopd/index.d.ts +5 -0
  197. package/node_modules/gopd/index.js +2 -3
  198. package/node_modules/gopd/package.json +16 -10
  199. package/node_modules/gopd/test/index.js +2 -1
  200. package/node_modules/gopd/tsconfig.json +9 -0
  201. package/node_modules/has-symbols/CHANGELOG.md +16 -0
  202. package/node_modules/has-symbols/index.d.ts +3 -0
  203. package/node_modules/has-symbols/index.js +1 -0
  204. package/node_modules/has-symbols/package.json +19 -9
  205. package/node_modules/has-symbols/shams.d.ts +3 -0
  206. package/node_modules/has-symbols/shams.js +5 -2
  207. package/node_modules/has-symbols/test/shams/core-js.js +1 -0
  208. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
  209. package/node_modules/has-symbols/test/tests.js +4 -2
  210. package/node_modules/has-symbols/tsconfig.json +10 -0
  211. package/node_modules/has-tostringtag/.eslintrc +0 -6
  212. package/node_modules/has-tostringtag/.nycrc +13 -0
  213. package/node_modules/has-tostringtag/CHANGELOG.md +22 -0
  214. package/node_modules/has-tostringtag/index.d.ts +3 -0
  215. package/node_modules/has-tostringtag/index.js +1 -0
  216. package/node_modules/has-tostringtag/package.json +37 -13
  217. package/node_modules/has-tostringtag/shams.d.ts +3 -0
  218. package/node_modules/has-tostringtag/shams.js +1 -0
  219. package/node_modules/has-tostringtag/test/shams/core-js.js +3 -0
  220. package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +2 -0
  221. package/node_modules/has-tostringtag/test/tests.js +2 -1
  222. package/node_modules/has-tostringtag/tsconfig.json +49 -0
  223. package/node_modules/hash-base/README.md +15 -15
  224. package/node_modules/hash-base/index.js +52 -9
  225. package/node_modules/hash-base/package.json +40 -40
  226. package/node_modules/hasown/CHANGELOG.md +20 -0
  227. package/node_modules/hasown/index.d.ts +3 -3
  228. package/node_modules/hasown/index.js +1 -1
  229. package/node_modules/hasown/package.json +16 -15
  230. package/node_modules/hasown/tsconfig.json +3 -46
  231. package/node_modules/is-arguments/.eslintrc +0 -1
  232. package/node_modules/is-arguments/CHANGELOG.md +22 -0
  233. package/node_modules/is-arguments/README.md +11 -11
  234. package/node_modules/is-arguments/index.d.ts +6 -0
  235. package/node_modules/is-arguments/index.js +19 -8
  236. package/node_modules/is-arguments/package.json +25 -11
  237. package/node_modules/is-arguments/test/index.js +4 -1
  238. package/node_modules/is-arguments/tsconfig.json +9 -0
  239. package/node_modules/is-generator-function/.eslintrc +1 -1
  240. package/node_modules/is-generator-function/CHANGELOG.md +21 -0
  241. package/node_modules/is-generator-function/index.d.ts +3 -0
  242. package/node_modules/is-generator-function/index.js +16 -7
  243. package/node_modules/is-generator-function/package.json +30 -11
  244. package/node_modules/is-generator-function/test/corejs.js +1 -0
  245. package/node_modules/is-generator-function/test/index.js +4 -7
  246. package/node_modules/is-generator-function/test/uglified.js +1 -0
  247. package/node_modules/is-generator-function/tsconfig.json +9 -0
  248. package/node_modules/is-regex/.editorconfig +23 -0
  249. package/node_modules/is-regex/.eslintrc +10 -0
  250. package/node_modules/is-regex/.nycrc +10 -0
  251. package/node_modules/is-regex/CHANGELOG.md +233 -0
  252. package/node_modules/is-regex/LICENSE +20 -0
  253. package/node_modules/is-regex/README.md +52 -0
  254. package/node_modules/is-regex/index.d.ts +3 -0
  255. package/node_modules/is-regex/index.js +69 -0
  256. package/node_modules/is-regex/package.json +104 -0
  257. package/node_modules/is-regex/test/index.js +121 -0
  258. package/node_modules/is-regex/tsconfig.json +9 -0
  259. package/node_modules/is-typed-array/CHANGELOG.md +32 -0
  260. package/node_modules/is-typed-array/index.d.ts +9 -0
  261. package/node_modules/is-typed-array/index.js +1 -0
  262. package/node_modules/is-typed-array/package.json +23 -10
  263. package/node_modules/is-typed-array/test/index.js +9 -1
  264. package/node_modules/is-typed-array/tsconfig.json +6 -0
  265. package/node_modules/math-intrinsics/.eslintrc +16 -0
  266. package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
  267. package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
  268. package/node_modules/math-intrinsics/LICENSE +21 -0
  269. package/node_modules/math-intrinsics/README.md +50 -0
  270. package/node_modules/math-intrinsics/abs.d.ts +1 -0
  271. package/node_modules/math-intrinsics/abs.js +4 -0
  272. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
  273. package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
  274. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
  275. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
  276. package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
  277. package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
  278. package/node_modules/math-intrinsics/floor.d.ts +1 -0
  279. package/node_modules/math-intrinsics/floor.js +4 -0
  280. package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
  281. package/node_modules/math-intrinsics/isFinite.js +12 -0
  282. package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
  283. package/node_modules/math-intrinsics/isInteger.js +16 -0
  284. package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
  285. package/node_modules/math-intrinsics/isNaN.js +6 -0
  286. package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
  287. package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
  288. package/node_modules/math-intrinsics/max.d.ts +1 -0
  289. package/node_modules/math-intrinsics/max.js +4 -0
  290. package/node_modules/math-intrinsics/min.d.ts +1 -0
  291. package/node_modules/math-intrinsics/min.js +4 -0
  292. package/node_modules/math-intrinsics/mod.d.ts +3 -0
  293. package/node_modules/math-intrinsics/mod.js +9 -0
  294. package/node_modules/math-intrinsics/package.json +86 -0
  295. package/node_modules/math-intrinsics/pow.d.ts +1 -0
  296. package/node_modules/math-intrinsics/pow.js +4 -0
  297. package/node_modules/math-intrinsics/round.d.ts +1 -0
  298. package/node_modules/math-intrinsics/round.js +4 -0
  299. package/node_modules/math-intrinsics/sign.d.ts +3 -0
  300. package/node_modules/math-intrinsics/sign.js +11 -0
  301. package/node_modules/math-intrinsics/test/index.js +192 -0
  302. package/node_modules/math-intrinsics/tsconfig.json +3 -0
  303. package/node_modules/miller-rabin/node_modules/bn.js/lib/bn.js +6 -5
  304. package/node_modules/miller-rabin/node_modules/bn.js/package.json +1 -1
  305. package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo.js +65 -0
  306. package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  307. package/node_modules/object-inspect/CHANGELOG.md +20 -0
  308. package/node_modules/object-inspect/index.js +27 -10
  309. package/node_modules/object-inspect/package.json +9 -8
  310. package/node_modules/object-inspect/test/quoteStyle.js +9 -0
  311. package/node_modules/object-inspect/test/values.js +50 -0
  312. package/node_modules/object-is/.eslintrc +1 -1
  313. package/node_modules/object-is/.nycrc +0 -4
  314. package/node_modules/object-is/CHANGELOG.md +25 -0
  315. package/node_modules/object-is/README.md +20 -20
  316. package/node_modules/object-is/package.json +23 -14
  317. package/node_modules/object.assign/CHANGELOG.md +21 -0
  318. package/node_modules/object.assign/dist/browser.js +495 -135
  319. package/node_modules/object.assign/implementation.js +6 -6
  320. package/node_modules/object.assign/package.json +14 -14
  321. package/node_modules/object.assign/test/tests.js +2 -2
  322. package/node_modules/possible-typed-array-names/.eslintrc +5 -0
  323. package/node_modules/possible-typed-array-names/.github/FUNDING.yml +12 -0
  324. package/node_modules/possible-typed-array-names/CHANGELOG.md +29 -0
  325. package/node_modules/possible-typed-array-names/LICENSE +21 -0
  326. package/node_modules/possible-typed-array-names/README.md +50 -0
  327. package/node_modules/possible-typed-array-names/index.d.ts +16 -0
  328. package/node_modules/possible-typed-array-names/index.js +17 -0
  329. package/node_modules/possible-typed-array-names/package.json +84 -0
  330. package/node_modules/possible-typed-array-names/test/index.js +19 -0
  331. package/node_modules/possible-typed-array-names/tsconfig.json +9 -0
  332. package/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js +6 -5
  333. package/node_modules/public-encrypt/node_modules/bn.js/package.json +1 -1
  334. package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js +65 -0
  335. package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js +65 -0
  336. package/node_modules/qs/.eslintrc +1 -0
  337. package/node_modules/qs/CHANGELOG.md +22 -0
  338. package/node_modules/qs/README.md +25 -1
  339. package/node_modules/qs/dist/qs.js +95 -44
  340. package/node_modules/qs/lib/parse.js +44 -12
  341. package/node_modules/qs/lib/stringify.js +11 -6
  342. package/node_modules/qs/lib/utils.js +7 -4
  343. package/node_modules/qs/package.json +9 -7
  344. package/node_modules/qs/test/parse.js +133 -27
  345. package/node_modules/qs/test/stringify.js +19 -11
  346. package/node_modules/qs/test/utils.js +126 -0
  347. package/node_modules/safe-regex-test/.eslintrc +9 -0
  348. package/node_modules/safe-regex-test/.github/FUNDING.yml +12 -0
  349. package/node_modules/safe-regex-test/.nycrc +13 -0
  350. package/node_modules/safe-regex-test/CHANGELOG.md +55 -0
  351. package/node_modules/safe-regex-test/LICENSE +21 -0
  352. package/node_modules/safe-regex-test/README.md +46 -0
  353. package/node_modules/safe-regex-test/index.d.ts +3 -0
  354. package/node_modules/safe-regex-test/index.js +17 -0
  355. package/node_modules/safe-regex-test/package.json +87 -0
  356. package/node_modules/safe-regex-test/test/index.js +41 -0
  357. package/node_modules/safe-regex-test/tsconfig.json +9 -0
  358. package/node_modules/side-channel/.eslintrc +1 -0
  359. package/node_modules/side-channel/CHANGELOG.md +15 -0
  360. package/node_modules/side-channel/README.md +60 -1
  361. package/node_modules/side-channel/index.d.ts +9 -22
  362. package/node_modules/side-channel/index.js +20 -106
  363. package/node_modules/side-channel/package.json +20 -19
  364. package/node_modules/side-channel/test/index.js +76 -55
  365. package/node_modules/side-channel/tsconfig.json +2 -43
  366. package/node_modules/side-channel-list/.editorconfig +9 -0
  367. package/node_modules/side-channel-list/.eslintrc +11 -0
  368. package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
  369. package/node_modules/side-channel-list/.nycrc +13 -0
  370. package/node_modules/side-channel-list/CHANGELOG.md +15 -0
  371. package/node_modules/side-channel-list/LICENSE +21 -0
  372. package/node_modules/side-channel-list/README.md +62 -0
  373. package/node_modules/side-channel-list/index.d.ts +13 -0
  374. package/node_modules/side-channel-list/index.js +113 -0
  375. package/node_modules/side-channel-list/list.d.ts +14 -0
  376. package/node_modules/side-channel-list/package.json +77 -0
  377. package/node_modules/side-channel-list/test/index.js +104 -0
  378. package/node_modules/side-channel-list/tsconfig.json +9 -0
  379. package/node_modules/side-channel-map/.editorconfig +9 -0
  380. package/node_modules/side-channel-map/.eslintrc +11 -0
  381. package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
  382. package/node_modules/side-channel-map/.nycrc +13 -0
  383. package/node_modules/side-channel-map/CHANGELOG.md +22 -0
  384. package/node_modules/side-channel-map/LICENSE +21 -0
  385. package/node_modules/side-channel-map/README.md +62 -0
  386. package/node_modules/side-channel-map/index.d.ts +15 -0
  387. package/node_modules/side-channel-map/index.js +68 -0
  388. package/node_modules/side-channel-map/package.json +80 -0
  389. package/node_modules/side-channel-map/test/index.js +114 -0
  390. package/node_modules/side-channel-map/tsconfig.json +9 -0
  391. package/node_modules/side-channel-weakmap/.editorconfig +9 -0
  392. package/node_modules/side-channel-weakmap/.eslintrc +12 -0
  393. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
  394. package/node_modules/side-channel-weakmap/.nycrc +13 -0
  395. package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
  396. package/node_modules/side-channel-weakmap/LICENSE +21 -0
  397. package/node_modules/side-channel-weakmap/README.md +62 -0
  398. package/node_modules/side-channel-weakmap/index.d.ts +15 -0
  399. package/node_modules/side-channel-weakmap/index.js +84 -0
  400. package/node_modules/side-channel-weakmap/package.json +87 -0
  401. package/node_modules/side-channel-weakmap/test/index.js +114 -0
  402. package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
  403. package/node_modules/which-typed-array/.eslintrc +1 -0
  404. package/node_modules/which-typed-array/CHANGELOG.md +57 -0
  405. package/node_modules/which-typed-array/index.d.ts +62 -0
  406. package/node_modules/which-typed-array/index.js +50 -25
  407. package/node_modules/which-typed-array/package.json +28 -13
  408. package/node_modules/which-typed-array/test/index.js +7 -1
  409. package/node_modules/which-typed-array/tsconfig.json +9 -0
  410. package/package.json +2 -3
  411. package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/README.md +0 -214
  412. package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/lib/bn.js +0 -3547
  413. package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/package.json +0 -39
  414. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/LICENSE +0 -21
  415. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/README.md +0 -48
  416. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/index.js +0 -138
  417. package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/package.json +0 -42
  418. package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/README.md +0 -48
  419. package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/index.js +0 -95
  420. package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/package.json +0 -41
  421. package/node_modules/available-typed-arrays/.eslintignore +0 -1
  422. package/node_modules/bn.js/CHANGELOG.md +0 -51
  423. package/node_modules/cipher-base/.npmignore +0 -1
  424. package/node_modules/cipher-base/.travis.yml +0 -6
  425. package/node_modules/cipher-base/test.js +0 -111
  426. package/node_modules/elliptic/node_modules/bn.js/README.md +0 -200
  427. package/node_modules/elliptic/node_modules/bn.js/lib/bn.js +0 -3446
  428. package/node_modules/elliptic/node_modules/bn.js/package.json +0 -36
  429. package/node_modules/elliptic/package.json +0 -56
  430. package/node_modules/for-each/.travis.yml +0 -45
  431. package/node_modules/for-each/test/.eslintrc +0 -8
  432. package/node_modules/has-proto/CHANGELOG.md +0 -23
  433. package/node_modules/has-proto/README.md +0 -38
  434. package/node_modules/has-proto/index.js +0 -11
  435. package/node_modules/has-proto/test/index.js +0 -19
  436. package/node_modules/hasown/index.d.ts.map +0 -1
  437. package/node_modules/is-arguments/.eslintignore +0 -1
  438. package/node_modules/is-generator-function/.eslintignore +0 -1
  439. package/node_modules/object-is/.eslintignore +0 -1
  440. package/node_modules/object.assign/test.html +0 -18458
  441. package/node_modules/parse-asn1/node_modules/hash-base/LICENSE +0 -21
  442. package/node_modules/parse-asn1/node_modules/hash-base/README.md +0 -48
  443. package/node_modules/parse-asn1/node_modules/hash-base/index.js +0 -95
  444. package/node_modules/parse-asn1/node_modules/hash-base/package.json +0 -41
  445. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/README.md +0 -0
  446. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/base.js +0 -0
  447. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/edwards.js +0 -0
  448. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/index.js +0 -0
  449. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/mont.js +0 -0
  450. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/short.js +0 -0
  451. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curves.js +0 -0
  452. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/index.js +0 -0
  453. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/key.js +0 -0
  454. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/signature.js +0 -0
  455. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/index.js +0 -0
  456. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/key.js +0 -0
  457. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/signature.js +0 -0
  458. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/precomputed/secp256k1.js +0 -0
  459. /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/utils.js +0 -0
  460. /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
@@ -0,0 +1,13 @@
1
+ {
2
+ "all": true,
3
+ "check-coverage": false,
4
+ "reporter": ["text-summary", "text", "html", "json"],
5
+ "lines": 86,
6
+ "statements": 85.93,
7
+ "functions": 82.43,
8
+ "branches": 76.06,
9
+ "exclude": [
10
+ "coverage",
11
+ "test"
12
+ ]
13
+ }
@@ -0,0 +1,55 @@
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/ljharb/safe-regex-test/compare/v1.0.3...v1.1.0) - 2024-12-12
9
+
10
+ ### Commits
11
+
12
+ - [actions] split out node 10-20, and 20+ [`b4a46bb`](https://github.com/ljharb/safe-regex-test/commit/b4a46bb30542251df8051aec52561ce2bb162f85)
13
+ - [New] add types [`5cb24eb`](https://github.com/ljharb/safe-regex-test/commit/5cb24eb6d074fdae200446e172f1ab485460c34e)
14
+ - [Dev Deps] update `@ljharb/eslint-config`, `auto-changelog`, `es-value-fixtures`, `object-inspect`, `tape` [`e225ca0`](https://github.com/ljharb/safe-regex-test/commit/e225ca081b77ea105b5e913a00473066efeb471d)
15
+ - [Refactor] use `call-bound` directly [`9be3cd2`](https://github.com/ljharb/safe-regex-test/commit/9be3cd2f390f23c0075ec93e5abdace0ee5d9d9d)
16
+ - [Deps] update `call-bind`, `is-regex` [`524b736`](https://github.com/ljharb/safe-regex-test/commit/524b73677e16de9dde27dfb8f30ac4760071bbda)
17
+ - [Tests] replace `aud` with `npm audit` [`f3cd537`](https://github.com/ljharb/safe-regex-test/commit/f3cd5379e48152daeb51fdd09e15d3ec74797761)
18
+ - [Dev Deps] add missing peer dep [`14da559`](https://github.com/ljharb/safe-regex-test/commit/14da559a0620b99a262ab9610dba13720915360f)
19
+
20
+ ## [v1.0.3](https://github.com/ljharb/safe-regex-test/compare/v1.0.2...v1.0.3) - 2024-02-06
21
+
22
+ ### Commits
23
+
24
+ - [Refactor] use `es-errors`, so things that only need those do not need `get-intrinsic` [`d6ba2f9`](https://github.com/ljharb/safe-regex-test/commit/d6ba2f948c679c3104ce6d6c897bedff0f1c5b74)
25
+ - [Deps] update `call-bind`, `get-intrinsic` [`5a3b1d7`](https://github.com/ljharb/safe-regex-test/commit/5a3b1d755e46f010e6930f15ec30eae023feffd3)
26
+ - [Dev Deps] update `tape` [`75fb719`](https://github.com/ljharb/safe-regex-test/commit/75fb71937c5daf1326052c59d6f251f439cd9332)
27
+
28
+ ## [v1.0.2](https://github.com/ljharb/safe-regex-test/compare/v1.0.1...v1.0.2) - 2024-01-11
29
+
30
+ ### Commits
31
+
32
+ - [meta] package.json `sideEffects` should be boolean [`094bb88`](https://github.com/ljharb/safe-regex-test/commit/094bb88d93ce25e26d20f5badee4e45acf0e3ac5)
33
+
34
+ ## [v1.0.1](https://github.com/ljharb/safe-regex-test/compare/v1.0.0...v1.0.1) - 2024-01-09
35
+
36
+ ### Commits
37
+
38
+ - [Tests] add nyc for coverage [`7e3f525`](https://github.com/ljharb/safe-regex-test/commit/7e3f5254efdf0979f72492f0e7f52a3a9814591f)
39
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `npmignore`, `object-inspect`, `tape` [`e7e0169`](https://github.com/ljharb/safe-regex-test/commit/e7e016949b78602f24debc1185c26f33cc4e9d1b)
40
+ - [actions] update rebase action [`2962694`](https://github.com/ljharb/safe-regex-test/commit/2962694bce7ffa278e873911072c11119bb3a608)
41
+ - [readme] add testing badges; remove david-dm badges [`e9dfd83`](https://github.com/ljharb/safe-regex-test/commit/e9dfd830655ac702ac7b7947f7076bb524994968)
42
+ - [Dev Deps] update `@ljharb/eslint-config`, `aud`, `object-inspect`, `tape` [`496fe99`](https://github.com/ljharb/safe-regex-test/commit/496fe99aa66f20cadb1cf79f6d479b87ae95b620)
43
+ - [Deps] update `call-bind`, `get-intrinsic` [`d94c5ba`](https://github.com/ljharb/safe-regex-test/commit/d94c5badd0362df8ff7ced38b50d20550fd629c1)
44
+ - [meta] add missing `engines.node` [`f3d4711`](https://github.com/ljharb/safe-regex-test/commit/f3d4711a51b21330e34f5f27e45452fbdb924715)
45
+ - [Deps] update `get-intrinsic` [`0eeedd7`](https://github.com/ljharb/safe-regex-test/commit/0eeedd74d0313fab9b0718895c02905f702ecb4d)
46
+ - [meta] add `sideEffects` flag [`fe1655f`](https://github.com/ljharb/safe-regex-test/commit/fe1655f16449208d987d9f4b7dafb15564ca80f7)
47
+
48
+ ## v1.0.0 - 2022-09-22
49
+
50
+ ### Commits
51
+
52
+ - Initial implementation, tests, readme [`0273e9f`](https://github.com/ljharb/safe-regex-test/commit/0273e9f96f4b09df413523f4faacc8ae9ac5e6cb)
53
+ - Initial commit [`b6c1edf`](https://github.com/ljharb/safe-regex-test/commit/b6c1edf740e6105fb71c34c1c69fadd837e8f7ab)
54
+ - npm init [`c7f5765`](https://github.com/ljharb/safe-regex-test/commit/c7f576580607b16458b5a16e6bfa3b639e49c6bd)
55
+ - Only apps should have lockfiles [`1162bf0`](https://github.com/ljharb/safe-regex-test/commit/1162bf011835040f7e2c9936734294b2d98536bf)
@@ -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,46 @@
1
+ # safe-regex-test <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
+ Give a regex, get a robust predicate function that tests it against a string. This will work even if `RegExp.prototype` is altered later.
11
+
12
+ ## Getting started
13
+
14
+ ```sh
15
+ npm install --save safe-regex-test
16
+ ```
17
+
18
+ ## Usage/Examples
19
+
20
+ ```js
21
+ var regexTester = require('safe-regex-test');
22
+ var assert = require('assert');
23
+
24
+ var tester = regexTester('a');
25
+ assert.ok(tester('a'));
26
+ assert.notOk(tester('b'));
27
+ ```
28
+
29
+ ## Tests
30
+ Simply clone the repo, `npm install`, and run `npm test`
31
+
32
+ [package-url]: https://npmjs.org/package/safe-regex-test
33
+ [npm-version-svg]: https://versionbadg.es/ljharb/safe-regex-test.svg
34
+ [deps-svg]: https://david-dm.org/ljharb/safe-regex-test.svg
35
+ [deps-url]: https://david-dm.org/ljharb/safe-regex-test
36
+ [dev-deps-svg]: https://david-dm.org/ljharb/safe-regex-test/dev-status.svg
37
+ [dev-deps-url]: https://david-dm.org/ljharb/safe-regex-test#info=devDependencies
38
+ [npm-badge-png]: https://nodei.co/npm/safe-regex-test.png?downloads=true&stars=true
39
+ [license-image]: https://img.shields.io/npm/l/safe-regex-test.svg
40
+ [license-url]: LICENSE
41
+ [downloads-image]: https://img.shields.io/npm/dm/safe-regex-test.svg
42
+ [downloads-url]: https://npm-stat.com/charts.html?package=safe-regex-test
43
+ [codecov-image]: https://codecov.io/gh/ljharb/safe-regex-test/branch/main/graphs/badge.svg
44
+ [codecov-url]: https://app.codecov.io/gh/ljharb/safe-regex-test/
45
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/safe-regex-test
46
+ [actions-url]: https://github.com/ljharb/safe-regex-test/actions
@@ -0,0 +1,3 @@
1
+ declare function regexTester(regex: RegExp): (string: string) => boolean;
2
+
3
+ export = regexTester;
@@ -0,0 +1,17 @@
1
+ 'use strict';
2
+
3
+ var callBound = require('call-bound');
4
+ var isRegex = require('is-regex');
5
+
6
+ var $exec = callBound('RegExp.prototype.exec');
7
+ var $TypeError = require('es-errors/type');
8
+
9
+ /** @type {import('.')} */
10
+ module.exports = function regexTester(regex) {
11
+ if (!isRegex(regex)) {
12
+ throw new $TypeError('`regex` must be a RegExp');
13
+ }
14
+ return function test(s) {
15
+ return $exec(regex, s) !== null;
16
+ };
17
+ };
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "safe-regex-test",
3
+ "version": "1.1.0",
4
+ "description": "Give a regex, get a robust predicate function that tests it against a string.",
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
+ "version": "auto-changelog && git add CHANGELOG.md",
14
+ "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\"",
15
+ "lint": "eslint --ext=js,mjs .",
16
+ "postlint": "tsc && attw -P",
17
+ "prepublish": "not-in-publish || npm run prepublishOnly",
18
+ "prepublishOnly": "safe-publish-latest",
19
+ "pretest": "npm run lint",
20
+ "tests-only": "nyc tape test",
21
+ "test": "npm run tests-only",
22
+ "posttest": "npx npm@'>= 10.2' audit --production"
23
+ },
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git+https://github.com/ljharb/safe-regex-test.git"
27
+ },
28
+ "keywords": [
29
+ "regex",
30
+ "regexp",
31
+ "test",
32
+ "tester",
33
+ "safe",
34
+ "robust",
35
+ "exec"
36
+ ],
37
+ "author": "Jordan Harband <ljharb@gmail.com>",
38
+ "funding": {
39
+ "url": "https://github.com/sponsors/ljharb"
40
+ },
41
+ "license": "MIT",
42
+ "bugs": {
43
+ "url": "https://github.com/ljharb/safe-regex-test/issues"
44
+ },
45
+ "homepage": "https://github.com/ljharb/safe-regex-test#readme",
46
+ "dependencies": {
47
+ "call-bound": "^1.0.2",
48
+ "es-errors": "^1.3.0",
49
+ "is-regex": "^1.2.1"
50
+ },
51
+ "devDependencies": {
52
+ "@arethetypeswrong/cli": "^0.17.1",
53
+ "@ljharb/eslint-config": "^21.1.1",
54
+ "@ljharb/tsconfig": "^0.2.2",
55
+ "@types/for-each": "^0.3.3",
56
+ "@types/object-inspect": "^1.13.0",
57
+ "@types/tape": "^5.6.5",
58
+ "auto-changelog": "^2.5.0",
59
+ "encoding": "^0.1.13",
60
+ "es-value-fixtures": "^1.5.0",
61
+ "eslint": "=8.8.0",
62
+ "for-each": "^0.3.3",
63
+ "in-publish": "^2.0.1",
64
+ "npmignore": "^0.3.1",
65
+ "nyc": "^10.3.2",
66
+ "object-inspect": "^1.13.3",
67
+ "safe-publish-latest": "^2.0.0",
68
+ "tape": "^5.9.0",
69
+ "typescript": "next"
70
+ },
71
+ "auto-changelog": {
72
+ "output": "CHANGELOG.md",
73
+ "template": "keepachangelog",
74
+ "unreleased": false,
75
+ "commitLimit": false,
76
+ "backfillLimit": false,
77
+ "hideCredit": true
78
+ },
79
+ "publishConfig": {
80
+ "ignore": [
81
+ ".github/workflows"
82
+ ]
83
+ },
84
+ "engines": {
85
+ "node": ">= 0.4"
86
+ }
87
+ }
@@ -0,0 +1,41 @@
1
+ 'use strict';
2
+
3
+ var test = require('tape');
4
+ var v = require('es-value-fixtures');
5
+ var forEach = require('for-each');
6
+ var inspect = require('object-inspect');
7
+
8
+ var regexTester = require('../');
9
+
10
+ test('regex tester', function (t) {
11
+ t.equal(typeof regexTester, 'function', 'is a function');
12
+
13
+ t.test('non-regexes', function (st) {
14
+ forEach([].concat(
15
+ // @ts-expect-error TS sucks with concat
16
+ v.primitives,
17
+ v.objects
18
+ ), function (val) {
19
+ st['throws'](
20
+ function () { regexTester(val); },
21
+ TypeError,
22
+ inspect(val) + ' is not a regex'
23
+ );
24
+ });
25
+
26
+ st.end();
27
+ });
28
+
29
+ t.test('regexes', function (st) {
30
+ var tester = regexTester(/a/);
31
+
32
+ st.equal(typeof tester, 'function', 'returns a function');
33
+ st.equal(tester('a'), true, 'returns true for a match');
34
+ st.equal(tester('b'), false, 'returns false for a non-match');
35
+ st.equal(tester('a'), true, 'returns true for a match again');
36
+
37
+ st.end();
38
+ });
39
+
40
+ t.end();
41
+ });
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "@ljharb/tsconfig",
3
+ "compilerOptions": {
4
+ // "target": "es2021",
5
+ },
6
+ "exclude": [
7
+ "coverage",
8
+ ],
9
+ }
@@ -4,6 +4,7 @@
4
4
  "extends": "@ljharb",
5
5
 
6
6
  "rules": {
7
+ "id-length": 0,
7
8
  "max-lines-per-function": 0,
8
9
  "multiline-comment-style": 1,
9
10
  "new-cap": [2, { "capIsNewExceptions": ["GetIntrinsic"] }],
@@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [v1.1.0](https://github.com/ljharb/side-channel/compare/v1.0.6...v1.1.0) - 2024-12-11
9
+
10
+ ### Commits
11
+
12
+ - [Refactor] extract implementations to `side-channel-weakmap`, `side-channel-map`, `side-channel-list` [`ada5955`](https://github.com/ljharb/side-channel/commit/ada595549a5c4c6c853756d598846b180941c6da)
13
+ - [New] add `channel.delete` [`c01d2d3`](https://github.com/ljharb/side-channel/commit/c01d2d3fd51dbb1ce6da72ad7916e61bd6172aad)
14
+ - [types] improve types [`0c54356`](https://github.com/ljharb/side-channel/commit/0c5435651417df41b8cc1a5f7cdce8bffae68cde)
15
+ - [readme] add content [`be24868`](https://github.com/ljharb/side-channel/commit/be248682ac294b0e22c883092c45985aa91c490a)
16
+ - [actions] split out node 10-20, and 20+ [`c4488e2`](https://github.com/ljharb/side-channel/commit/c4488e241ef3d49a19fe266ac830a2e644305911)
17
+ - [types] use shared tsconfig [`0e0d57c`](https://github.com/ljharb/side-channel/commit/0e0d57c2ff17c7b45c6cbd43ebcf553edc9e3adc)
18
+ - [Dev Deps] update `@ljharb/eslint-config`, `@ljharb/tsconfig`, `@types/get-intrinsic`, `@types/object-inspect`, `@types/tape`, `auto-changelog`, `tape` [`fb4f622`](https://github.com/ljharb/side-channel/commit/fb4f622e64a99a1e40b6e5cd7691674a9dc429e4)
19
+ - [Deps] update `call-bind`, `get-intrinsic`, `object-inspect` [`b78336b`](https://github.com/ljharb/side-channel/commit/b78336b886172d1b457d414ac9e28de8c5fecc78)
20
+ - [Tests] replace `aud` with `npm audit` [`ee3ab46`](https://github.com/ljharb/side-channel/commit/ee3ab4690d954311c35115651bcfd45edd205aa1)
21
+ - [Dev Deps] add missing peer dep [`c03e21a`](https://github.com/ljharb/side-channel/commit/c03e21a7def3b67cdc15ae22316884fefcb2f6a8)
22
+
8
23
  ## [v1.0.6](https://github.com/ljharb/side-channel/compare/v1.0.5...v1.0.6) - 2024-02-29
9
24
 
10
25
  ### Commits
@@ -1,2 +1,61 @@
1
- # side-channel
1
+ # side-channel <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
+
2
10
  Store information about any JS value in a side channel. Uses WeakMap if available.
11
+
12
+ Warning: in an environment that lacks `WeakMap`, this implementation will leak memory until you `delete` the `key`.
13
+
14
+ ## Getting started
15
+
16
+ ```sh
17
+ npm install --save side-channel
18
+ ```
19
+
20
+ ## Usage/Examples
21
+
22
+ ```js
23
+ const assert = require('assert');
24
+ const getSideChannel = require('side-channel');
25
+
26
+ const channel = getSideChannel();
27
+
28
+ const key = {};
29
+ assert.equal(channel.has(key), false);
30
+ assert.throws(() => channel.assert(key), TypeError);
31
+
32
+ channel.set(key, 42);
33
+
34
+ channel.assert(key); // does not throw
35
+ assert.equal(channel.has(key), true);
36
+ assert.equal(channel.get(key), 42);
37
+
38
+ channel.delete(key);
39
+ assert.equal(channel.has(key), false);
40
+ assert.throws(() => channel.assert(key), TypeError);
41
+ ```
42
+
43
+ ## Tests
44
+
45
+ Clone the repo, `npm install`, and run `npm test`
46
+
47
+ [package-url]: https://npmjs.org/package/side-channel
48
+ [npm-version-svg]: https://versionbadg.es/ljharb/side-channel.svg
49
+ [deps-svg]: https://david-dm.org/ljharb/side-channel.svg
50
+ [deps-url]: https://david-dm.org/ljharb/side-channel
51
+ [dev-deps-svg]: https://david-dm.org/ljharb/side-channel/dev-status.svg
52
+ [dev-deps-url]: https://david-dm.org/ljharb/side-channel#info=devDependencies
53
+ [npm-badge-png]: https://nodei.co/npm/side-channel.png?downloads=true&stars=true
54
+ [license-image]: https://img.shields.io/npm/l/side-channel.svg
55
+ [license-url]: LICENSE
56
+ [downloads-image]: https://img.shields.io/npm/dm/side-channel.svg
57
+ [downloads-url]: https://npm-stat.com/charts.html?package=side-channel
58
+ [codecov-image]: https://codecov.io/gh/ljharb/side-channel/branch/main/graphs/badge.svg
59
+ [codecov-url]: https://app.codecov.io/gh/ljharb/side-channel/
60
+ [actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/ljharb/side-channel
61
+ [actions-url]: https://github.com/ljharb/side-channel/actions
@@ -1,27 +1,14 @@
1
- declare namespace getSideChannel {
2
- type Key = unknown;
3
- type ListNode<T> = {
4
- key: Key;
5
- next: ListNode<T>;
6
- value: T;
7
- };
8
- type RootNode<T> = {
9
- key: object;
10
- next: null | ListNode<T>;
11
- };
12
- function listGetNode<T>(list: RootNode<T>, key: ListNode<T>['key']): ListNode<T> | void;
13
- function listGet<T>(objects: RootNode<T>, key: ListNode<T>['key']): T | void;
14
- function listSet<T>(objects: RootNode<T>, key: ListNode<T>['key'], value: T): void;
15
- function listHas<T>(objects: RootNode<T>, key: ListNode<T>['key']): boolean;
1
+ import getSideChannelList from 'side-channel-list';
2
+ import getSideChannelMap from 'side-channel-map';
3
+ import getSideChannelWeakMap from 'side-channel-weakmap';
16
4
 
17
- type Channel = {
18
- assert: (key: Key) => void;
19
- has: (key: Key) => boolean;
20
- get: <T>(key: Key) => T;
21
- set: <T>(key: Key, value: T) => void;
22
- }
5
+ declare namespace getSideChannel {
6
+ type Channel<K, V> =
7
+ | getSideChannelList.Channel<K, V>
8
+ | ReturnType<Exclude<typeof getSideChannelMap<K, V>, false>>
9
+ | ReturnType<Exclude<typeof getSideChannelWeakMap<K, V>, false>>;
23
10
  }
24
11
 
25
- declare function getSideChannel(): getSideChannel.Channel;
12
+ declare function getSideChannel<K, V>(): getSideChannel.Channel<K, V>;
26
13
 
27
14
  export = getSideChannel;
@@ -1,129 +1,43 @@
1
1
  'use strict';
2
2
 
3
- var GetIntrinsic = require('get-intrinsic');
4
- var callBound = require('call-bind/callBound');
5
- var inspect = require('object-inspect');
6
-
7
3
  var $TypeError = require('es-errors/type');
8
- var $WeakMap = GetIntrinsic('%WeakMap%', true);
9
- var $Map = GetIntrinsic('%Map%', true);
10
-
11
- var $weakMapGet = callBound('WeakMap.prototype.get', true);
12
- var $weakMapSet = callBound('WeakMap.prototype.set', true);
13
- var $weakMapHas = callBound('WeakMap.prototype.has', true);
14
- var $mapGet = callBound('Map.prototype.get', true);
15
- var $mapSet = callBound('Map.prototype.set', true);
16
- var $mapHas = callBound('Map.prototype.has', true);
4
+ var inspect = require('object-inspect');
5
+ var getSideChannelList = require('side-channel-list');
6
+ var getSideChannelMap = require('side-channel-map');
7
+ var getSideChannelWeakMap = require('side-channel-weakmap');
17
8
 
18
- /*
19
- * This function traverses the list returning the node corresponding to the given key.
20
- *
21
- * That node is also moved to the head of the list, so that if it's accessed again we don't need to traverse the whole list. By doing so, all the recently used nodes can be accessed relatively quickly.
22
- */
23
- /** @type {import('.').listGetNode} */
24
- var listGetNode = function (list, key) { // eslint-disable-line consistent-return
25
- /** @type {typeof list | NonNullable<(typeof list)['next']>} */
26
- var prev = list;
27
- /** @type {(typeof list)['next']} */
28
- var curr;
29
- for (; (curr = prev.next) !== null; prev = curr) {
30
- if (curr.key === key) {
31
- prev.next = curr.next;
32
- // eslint-disable-next-line no-extra-parens
33
- curr.next = /** @type {NonNullable<typeof list.next>} */ (list.next);
34
- list.next = curr; // eslint-disable-line no-param-reassign
35
- return curr;
36
- }
37
- }
38
- };
39
-
40
- /** @type {import('.').listGet} */
41
- var listGet = function (objects, key) {
42
- var node = listGetNode(objects, key);
43
- return node && node.value;
44
- };
45
- /** @type {import('.').listSet} */
46
- var listSet = function (objects, key, value) {
47
- var node = listGetNode(objects, key);
48
- if (node) {
49
- node.value = value;
50
- } else {
51
- // Prepend the new node to the beginning of the list
52
- objects.next = /** @type {import('.').ListNode<typeof value>} */ ({ // eslint-disable-line no-param-reassign, no-extra-parens
53
- key: key,
54
- next: objects.next,
55
- value: value
56
- });
57
- }
58
- };
59
- /** @type {import('.').listHas} */
60
- var listHas = function (objects, key) {
61
- return !!listGetNode(objects, key);
62
- };
9
+ var makeChannel = getSideChannelWeakMap || getSideChannelMap || getSideChannelList;
63
10
 
64
11
  /** @type {import('.')} */
65
12
  module.exports = function getSideChannel() {
66
- /** @type {WeakMap<object, unknown>} */ var $wm;
67
- /** @type {Map<object, unknown>} */ var $m;
68
- /** @type {import('.').RootNode<unknown>} */ var $o;
13
+ /** @typedef {ReturnType<typeof getSideChannel>} Channel */
69
14
 
70
- /** @type {import('.').Channel} */
15
+ /** @type {Channel | undefined} */ var $channelData;
16
+
17
+ /** @type {Channel} */
71
18
  var channel = {
72
19
  assert: function (key) {
73
20
  if (!channel.has(key)) {
74
21
  throw new $TypeError('Side channel does not contain ' + inspect(key));
75
22
  }
76
23
  },
77
- get: function (key) { // eslint-disable-line consistent-return
78
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
79
- if ($wm) {
80
- return $weakMapGet($wm, key);
81
- }
82
- } else if ($Map) {
83
- if ($m) {
84
- return $mapGet($m, key);
85
- }
86
- } else {
87
- if ($o) { // eslint-disable-line no-lonely-if
88
- return listGet($o, key);
89
- }
90
- }
24
+ 'delete': function (key) {
25
+ return !!$channelData && $channelData['delete'](key);
26
+ },
27
+ get: function (key) {
28
+ return $channelData && $channelData.get(key);
91
29
  },
92
30
  has: function (key) {
93
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
94
- if ($wm) {
95
- return $weakMapHas($wm, key);
96
- }
97
- } else if ($Map) {
98
- if ($m) {
99
- return $mapHas($m, key);
100
- }
101
- } else {
102
- if ($o) { // eslint-disable-line no-lonely-if
103
- return listHas($o, key);
104
- }
105
- }
106
- return false;
31
+ return !!$channelData && $channelData.has(key);
107
32
  },
108
33
  set: function (key, value) {
109
- if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
110
- if (!$wm) {
111
- $wm = new $WeakMap();
112
- }
113
- $weakMapSet($wm, key, value);
114
- } else if ($Map) {
115
- if (!$m) {
116
- $m = new $Map();
117
- }
118
- $mapSet($m, key, value);
119
- } else {
120
- if (!$o) {
121
- // Initialize the linked list as an empty node, so that we don't have to special-case handling of the first node: we can always refer to it as (previous node).next, instead of something like (list).head
122
- $o = { key: {}, next: null };
123
- }
124
- listSet($o, key, value);
34
+ if (!$channelData) {
35
+ $channelData = makeChannel();
125
36
  }
37
+
38
+ $channelData.set(key, value);
126
39
  }
127
40
  };
41
+ // @ts-expect-error TODO: figure out why this is erroring
128
42
  return channel;
129
43
  };
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "side-channel",
3
- "version": "1.0.6",
3
+ "version": "1.1.0",
4
4
  "description": "Store information about any JS value in a side channel. Uses WeakMap if available.",
5
5
  "main": "index.js",
6
6
  "exports": {
7
- "./package.json": "./package.json",
8
- ".": "./index.js"
7
+ ".": "./index.js",
8
+ "./package.json": "./package.json"
9
9
  },
10
10
  "types": "./index.d.ts",
11
11
  "scripts": {
@@ -14,11 +14,11 @@
14
14
  "prepublish": "not-in-publish || npm run prepublishOnly",
15
15
  "prelint": "eclint check $(git ls-files | xargs find 2> /dev/null | grep -vE 'node_modules|\\.git')",
16
16
  "lint": "eslint --ext=js,mjs .",
17
- "postlint": "tsc -p .",
17
+ "postlint": "tsc -p . && attw -P",
18
18
  "pretest": "npm run lint",
19
19
  "tests-only": "nyc tape 'test/**/*.js'",
20
20
  "test": "npm run tests-only",
21
- "posttest": "aud --production",
21
+ "posttest": "npx npm@'>=10.2' audit --production",
22
22
  "version": "auto-changelog && git add CHANGELOG.md",
23
23
  "postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
24
24
  },
@@ -42,29 +42,30 @@
42
42
  "url": "https://github.com/ljharb/side-channel/issues"
43
43
  },
44
44
  "homepage": "https://github.com/ljharb/side-channel#readme",
45
+ "dependencies": {
46
+ "es-errors": "^1.3.0",
47
+ "object-inspect": "^1.13.3",
48
+ "side-channel-list": "^1.0.0",
49
+ "side-channel-map": "^1.0.1",
50
+ "side-channel-weakmap": "^1.0.2"
51
+ },
45
52
  "devDependencies": {
46
- "@ljharb/eslint-config": "^21.1.0",
47
- "@types/call-bind": "^1.0.5",
48
- "@types/get-intrinsic": "^1.2.2",
49
- "@types/object-inspect": "^1.8.4",
50
- "@types/tape": "^5.6.4",
51
- "aud": "^2.0.4",
52
- "auto-changelog": "^2.4.0",
53
+ "@arethetypeswrong/cli": "^0.17.1",
54
+ "@ljharb/eslint-config": "^21.1.1",
55
+ "@ljharb/tsconfig": "^0.2.2",
56
+ "@types/object-inspect": "^1.13.0",
57
+ "@types/tape": "^5.6.5",
58
+ "auto-changelog": "^2.5.0",
53
59
  "eclint": "^2.8.1",
60
+ "encoding": "^0.1.13",
54
61
  "eslint": "=8.8.0",
55
62
  "in-publish": "^2.0.1",
56
63
  "npmignore": "^0.3.1",
57
64
  "nyc": "^10.3.2",
58
65
  "safe-publish-latest": "^2.0.0",
59
- "tape": "^5.7.5",
66
+ "tape": "^5.9.0",
60
67
  "typescript": "next"
61
68
  },
62
- "dependencies": {
63
- "call-bind": "^1.0.7",
64
- "es-errors": "^1.3.0",
65
- "get-intrinsic": "^1.2.4",
66
- "object-inspect": "^1.13.1"
67
- },
68
69
  "auto-changelog": {
69
70
  "output": "CHANGELOG.md",
70
71
  "template": "keepachangelog",