noodleseed-cli 0.1.15 → 0.1.16

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 (558) hide show
  1. package/dist/cli.js +3 -3
  2. package/dist/cli.js.map +1 -1
  3. package/dist/project.d.ts +1 -1
  4. package/dist/project.d.ts.map +1 -1
  5. package/dist/project.js +103 -3
  6. package/dist/project.js.map +1 -1
  7. package/node_modules/@modelcontextprotocol/sdk/package.json +0 -2
  8. package/node_modules/@noodle-borg/authoring/dist/index.d.ts +3 -2
  9. package/node_modules/@noodle-borg/authoring/dist/index.d.ts.map +1 -1
  10. package/node_modules/@noodle-borg/authoring/dist/index.js +2 -1
  11. package/node_modules/@noodle-borg/authoring/dist/index.js.map +1 -1
  12. package/node_modules/@noodle-borg/compiler/dist/compile.d.ts.map +1 -1
  13. package/node_modules/@noodle-borg/compiler/dist/compile.js +30 -2
  14. package/node_modules/@noodle-borg/compiler/dist/compile.js.map +1 -1
  15. package/node_modules/@noodle-borg/compiler/dist/index.d.ts +1 -0
  16. package/node_modules/@noodle-borg/compiler/dist/index.d.ts.map +1 -1
  17. package/node_modules/@noodle-borg/compiler/dist/index.js +1 -0
  18. package/node_modules/@noodle-borg/compiler/dist/index.js.map +1 -1
  19. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts +14866 -2
  20. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.d.ts.map +1 -1
  21. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js +12 -2
  22. package/node_modules/@noodle-borg/compiler/dist/manifest/schema.js.map +1 -1
  23. package/node_modules/@noodle-borg/compiler/dist/widget-ui.d.ts +95 -0
  24. package/node_modules/@noodle-borg/compiler/dist/widget-ui.d.ts.map +1 -0
  25. package/node_modules/@noodle-borg/compiler/dist/widget-ui.js +177 -0
  26. package/node_modules/@noodle-borg/compiler/dist/widget-ui.js.map +1 -0
  27. package/node_modules/@noodle-borg/compiler/node_modules/.bin/yaml +3 -3
  28. package/node_modules/@noodle-borg/connector-defs/node_modules/.bin/yaml +3 -3
  29. package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.d.ts.map +1 -1
  30. package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.js +60 -3
  31. package/node_modules/@noodle-borg/protocol/dist/widget/bootstrap.js.map +1 -1
  32. package/node_modules/@noodle-borg/service/package.json +0 -1
  33. package/node_modules/cors/package.json +0 -1
  34. package/node_modules/cross-spawn/node_modules/.bin/node-which +3 -3
  35. package/package.json +1 -56
  36. package/node_modules/accepts/HISTORY.md +0 -250
  37. package/node_modules/accepts/LICENSE +0 -23
  38. package/node_modules/accepts/README.md +0 -140
  39. package/node_modules/accepts/index.js +0 -238
  40. package/node_modules/accepts/package.json +0 -47
  41. package/node_modules/body-parser/LICENSE +0 -23
  42. package/node_modules/body-parser/README.md +0 -494
  43. package/node_modules/body-parser/index.js +0 -71
  44. package/node_modules/body-parser/lib/read.js +0 -247
  45. package/node_modules/body-parser/lib/types/json.js +0 -158
  46. package/node_modules/body-parser/lib/types/raw.js +0 -42
  47. package/node_modules/body-parser/lib/types/text.js +0 -36
  48. package/node_modules/body-parser/lib/types/urlencoded.js +0 -142
  49. package/node_modules/body-parser/lib/utils.js +0 -98
  50. package/node_modules/body-parser/package.json +0 -52
  51. package/node_modules/call-bind-apply-helpers/.eslintrc +0 -17
  52. package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +0 -12
  53. package/node_modules/call-bind-apply-helpers/.nycrc +0 -9
  54. package/node_modules/call-bind-apply-helpers/CHANGELOG.md +0 -30
  55. package/node_modules/call-bind-apply-helpers/LICENSE +0 -21
  56. package/node_modules/call-bind-apply-helpers/README.md +0 -62
  57. package/node_modules/call-bind-apply-helpers/actualApply.d.ts +0 -1
  58. package/node_modules/call-bind-apply-helpers/actualApply.js +0 -10
  59. package/node_modules/call-bind-apply-helpers/applyBind.d.ts +0 -19
  60. package/node_modules/call-bind-apply-helpers/applyBind.js +0 -10
  61. package/node_modules/call-bind-apply-helpers/functionApply.d.ts +0 -1
  62. package/node_modules/call-bind-apply-helpers/functionApply.js +0 -4
  63. package/node_modules/call-bind-apply-helpers/functionCall.d.ts +0 -1
  64. package/node_modules/call-bind-apply-helpers/functionCall.js +0 -4
  65. package/node_modules/call-bind-apply-helpers/index.d.ts +0 -64
  66. package/node_modules/call-bind-apply-helpers/index.js +0 -15
  67. package/node_modules/call-bind-apply-helpers/package.json +0 -85
  68. package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +0 -3
  69. package/node_modules/call-bind-apply-helpers/reflectApply.js +0 -4
  70. package/node_modules/call-bind-apply-helpers/test/index.js +0 -63
  71. package/node_modules/call-bind-apply-helpers/tsconfig.json +0 -9
  72. package/node_modules/call-bound/.eslintrc +0 -13
  73. package/node_modules/call-bound/.github/FUNDING.yml +0 -12
  74. package/node_modules/call-bound/.nycrc +0 -9
  75. package/node_modules/call-bound/CHANGELOG.md +0 -42
  76. package/node_modules/call-bound/LICENSE +0 -21
  77. package/node_modules/call-bound/README.md +0 -53
  78. package/node_modules/call-bound/index.d.ts +0 -94
  79. package/node_modules/call-bound/index.js +0 -19
  80. package/node_modules/call-bound/package.json +0 -99
  81. package/node_modules/call-bound/test/index.js +0 -61
  82. package/node_modules/call-bound/tsconfig.json +0 -10
  83. package/node_modules/content-disposition/LICENSE +0 -22
  84. package/node_modules/content-disposition/README.md +0 -141
  85. package/node_modules/content-disposition/index.js +0 -536
  86. package/node_modules/content-disposition/package.json +0 -40
  87. package/node_modules/cookie/LICENSE +0 -24
  88. package/node_modules/cookie/README.md +0 -317
  89. package/node_modules/cookie/SECURITY.md +0 -25
  90. package/node_modules/cookie/index.js +0 -335
  91. package/node_modules/cookie/package.json +0 -44
  92. package/node_modules/cookie-signature/History.md +0 -70
  93. package/node_modules/cookie-signature/LICENSE +0 -22
  94. package/node_modules/cookie-signature/Readme.md +0 -23
  95. package/node_modules/cookie-signature/index.js +0 -47
  96. package/node_modules/cookie-signature/package.json +0 -28
  97. package/node_modules/debug/LICENSE +0 -20
  98. package/node_modules/debug/README.md +0 -481
  99. package/node_modules/debug/package.json +0 -64
  100. package/node_modules/debug/src/browser.js +0 -272
  101. package/node_modules/debug/src/common.js +0 -292
  102. package/node_modules/debug/src/index.js +0 -10
  103. package/node_modules/debug/src/node.js +0 -263
  104. package/node_modules/dunder-proto/.eslintrc +0 -5
  105. package/node_modules/dunder-proto/.github/FUNDING.yml +0 -12
  106. package/node_modules/dunder-proto/.nycrc +0 -13
  107. package/node_modules/dunder-proto/CHANGELOG.md +0 -24
  108. package/node_modules/dunder-proto/LICENSE +0 -21
  109. package/node_modules/dunder-proto/README.md +0 -54
  110. package/node_modules/dunder-proto/get.d.ts +0 -5
  111. package/node_modules/dunder-proto/get.js +0 -30
  112. package/node_modules/dunder-proto/package.json +0 -76
  113. package/node_modules/dunder-proto/set.d.ts +0 -5
  114. package/node_modules/dunder-proto/set.js +0 -35
  115. package/node_modules/dunder-proto/test/get.js +0 -34
  116. package/node_modules/dunder-proto/test/index.js +0 -4
  117. package/node_modules/dunder-proto/test/set.js +0 -50
  118. package/node_modules/dunder-proto/tsconfig.json +0 -9
  119. package/node_modules/ee-first/LICENSE +0 -22
  120. package/node_modules/ee-first/README.md +0 -80
  121. package/node_modules/ee-first/index.js +0 -95
  122. package/node_modules/ee-first/package.json +0 -29
  123. package/node_modules/encodeurl/LICENSE +0 -22
  124. package/node_modules/encodeurl/README.md +0 -109
  125. package/node_modules/encodeurl/index.js +0 -60
  126. package/node_modules/encodeurl/package.json +0 -40
  127. package/node_modules/es-define-property/.eslintrc +0 -13
  128. package/node_modules/es-define-property/.github/FUNDING.yml +0 -12
  129. package/node_modules/es-define-property/.nycrc +0 -9
  130. package/node_modules/es-define-property/CHANGELOG.md +0 -29
  131. package/node_modules/es-define-property/LICENSE +0 -21
  132. package/node_modules/es-define-property/README.md +0 -49
  133. package/node_modules/es-define-property/index.d.ts +0 -3
  134. package/node_modules/es-define-property/index.js +0 -14
  135. package/node_modules/es-define-property/package.json +0 -81
  136. package/node_modules/es-define-property/test/index.js +0 -56
  137. package/node_modules/es-define-property/tsconfig.json +0 -10
  138. package/node_modules/es-errors/.eslintrc +0 -5
  139. package/node_modules/es-errors/.github/FUNDING.yml +0 -12
  140. package/node_modules/es-errors/CHANGELOG.md +0 -40
  141. package/node_modules/es-errors/LICENSE +0 -21
  142. package/node_modules/es-errors/README.md +0 -55
  143. package/node_modules/es-errors/eval.d.ts +0 -3
  144. package/node_modules/es-errors/eval.js +0 -4
  145. package/node_modules/es-errors/index.d.ts +0 -3
  146. package/node_modules/es-errors/index.js +0 -4
  147. package/node_modules/es-errors/package.json +0 -80
  148. package/node_modules/es-errors/range.d.ts +0 -3
  149. package/node_modules/es-errors/range.js +0 -4
  150. package/node_modules/es-errors/ref.d.ts +0 -3
  151. package/node_modules/es-errors/ref.js +0 -4
  152. package/node_modules/es-errors/syntax.d.ts +0 -3
  153. package/node_modules/es-errors/syntax.js +0 -4
  154. package/node_modules/es-errors/test/index.js +0 -19
  155. package/node_modules/es-errors/tsconfig.json +0 -49
  156. package/node_modules/es-errors/type.d.ts +0 -3
  157. package/node_modules/es-errors/type.js +0 -4
  158. package/node_modules/es-errors/uri.d.ts +0 -3
  159. package/node_modules/es-errors/uri.js +0 -4
  160. package/node_modules/es-object-atoms/.eslintrc +0 -16
  161. package/node_modules/es-object-atoms/.github/FUNDING.yml +0 -12
  162. package/node_modules/es-object-atoms/CHANGELOG.md +0 -44
  163. package/node_modules/es-object-atoms/LICENSE +0 -21
  164. package/node_modules/es-object-atoms/README.md +0 -63
  165. package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +0 -3
  166. package/node_modules/es-object-atoms/RequireObjectCoercible.js +0 -11
  167. package/node_modules/es-object-atoms/ToObject.d.ts +0 -7
  168. package/node_modules/es-object-atoms/ToObject.js +0 -10
  169. package/node_modules/es-object-atoms/index.d.ts +0 -3
  170. package/node_modules/es-object-atoms/index.js +0 -4
  171. package/node_modules/es-object-atoms/isObject.d.ts +0 -3
  172. package/node_modules/es-object-atoms/isObject.js +0 -6
  173. package/node_modules/es-object-atoms/package.json +0 -79
  174. package/node_modules/es-object-atoms/test/index.js +0 -38
  175. package/node_modules/es-object-atoms/tsconfig.json +0 -7
  176. package/node_modules/escape-html/LICENSE +0 -24
  177. package/node_modules/escape-html/Readme.md +0 -43
  178. package/node_modules/escape-html/index.js +0 -78
  179. package/node_modules/escape-html/package.json +0 -24
  180. package/node_modules/etag/HISTORY.md +0 -83
  181. package/node_modules/etag/LICENSE +0 -22
  182. package/node_modules/etag/README.md +0 -159
  183. package/node_modules/etag/index.js +0 -131
  184. package/node_modules/etag/package.json +0 -47
  185. package/node_modules/express/LICENSE +0 -24
  186. package/node_modules/express/Readme.md +0 -276
  187. package/node_modules/express/index.js +0 -11
  188. package/node_modules/express/lib/application.js +0 -631
  189. package/node_modules/express/lib/express.js +0 -81
  190. package/node_modules/express/lib/request.js +0 -514
  191. package/node_modules/express/lib/response.js +0 -1053
  192. package/node_modules/express/lib/utils.js +0 -271
  193. package/node_modules/express/lib/view.js +0 -205
  194. package/node_modules/express/package.json +0 -99
  195. package/node_modules/express-rate-limit/dist/index.cjs +0 -1016
  196. package/node_modules/express-rate-limit/dist/index.d.cts +0 -672
  197. package/node_modules/express-rate-limit/dist/index.d.mts +0 -672
  198. package/node_modules/express-rate-limit/dist/index.d.ts +0 -672
  199. package/node_modules/express-rate-limit/dist/index.mjs +0 -986
  200. package/node_modules/express-rate-limit/license.md +0 -20
  201. package/node_modules/express-rate-limit/package.json +0 -113
  202. package/node_modules/express-rate-limit/readme.md +0 -139
  203. package/node_modules/express-rate-limit/tsconfig.json +0 -8
  204. package/node_modules/finalhandler/HISTORY.md +0 -239
  205. package/node_modules/finalhandler/LICENSE +0 -22
  206. package/node_modules/finalhandler/README.md +0 -150
  207. package/node_modules/finalhandler/index.js +0 -293
  208. package/node_modules/finalhandler/package.json +0 -47
  209. package/node_modules/forwarded/HISTORY.md +0 -21
  210. package/node_modules/forwarded/LICENSE +0 -22
  211. package/node_modules/forwarded/README.md +0 -57
  212. package/node_modules/forwarded/index.js +0 -90
  213. package/node_modules/forwarded/package.json +0 -45
  214. package/node_modules/fresh/HISTORY.md +0 -80
  215. package/node_modules/fresh/LICENSE +0 -23
  216. package/node_modules/fresh/README.md +0 -117
  217. package/node_modules/fresh/index.js +0 -136
  218. package/node_modules/fresh/package.json +0 -46
  219. package/node_modules/function-bind/.eslintrc +0 -21
  220. package/node_modules/function-bind/.github/FUNDING.yml +0 -12
  221. package/node_modules/function-bind/.github/SECURITY.md +0 -3
  222. package/node_modules/function-bind/.nycrc +0 -13
  223. package/node_modules/function-bind/CHANGELOG.md +0 -136
  224. package/node_modules/function-bind/LICENSE +0 -20
  225. package/node_modules/function-bind/README.md +0 -46
  226. package/node_modules/function-bind/implementation.js +0 -84
  227. package/node_modules/function-bind/index.js +0 -5
  228. package/node_modules/function-bind/package.json +0 -87
  229. package/node_modules/function-bind/test/.eslintrc +0 -9
  230. package/node_modules/function-bind/test/index.js +0 -252
  231. package/node_modules/get-intrinsic/.eslintrc +0 -42
  232. package/node_modules/get-intrinsic/.github/FUNDING.yml +0 -12
  233. package/node_modules/get-intrinsic/.nycrc +0 -9
  234. package/node_modules/get-intrinsic/CHANGELOG.md +0 -186
  235. package/node_modules/get-intrinsic/LICENSE +0 -21
  236. package/node_modules/get-intrinsic/README.md +0 -71
  237. package/node_modules/get-intrinsic/index.js +0 -378
  238. package/node_modules/get-intrinsic/package.json +0 -97
  239. package/node_modules/get-intrinsic/test/GetIntrinsic.js +0 -274
  240. package/node_modules/get-proto/.eslintrc +0 -10
  241. package/node_modules/get-proto/.github/FUNDING.yml +0 -12
  242. package/node_modules/get-proto/.nycrc +0 -9
  243. package/node_modules/get-proto/CHANGELOG.md +0 -21
  244. package/node_modules/get-proto/LICENSE +0 -21
  245. package/node_modules/get-proto/Object.getPrototypeOf.d.ts +0 -5
  246. package/node_modules/get-proto/Object.getPrototypeOf.js +0 -6
  247. package/node_modules/get-proto/README.md +0 -50
  248. package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +0 -3
  249. package/node_modules/get-proto/Reflect.getPrototypeOf.js +0 -4
  250. package/node_modules/get-proto/index.d.ts +0 -5
  251. package/node_modules/get-proto/index.js +0 -27
  252. package/node_modules/get-proto/package.json +0 -81
  253. package/node_modules/get-proto/test/index.js +0 -68
  254. package/node_modules/get-proto/tsconfig.json +0 -9
  255. package/node_modules/gopd/.eslintrc +0 -16
  256. package/node_modules/gopd/.github/FUNDING.yml +0 -12
  257. package/node_modules/gopd/CHANGELOG.md +0 -45
  258. package/node_modules/gopd/LICENSE +0 -21
  259. package/node_modules/gopd/README.md +0 -40
  260. package/node_modules/gopd/gOPD.d.ts +0 -1
  261. package/node_modules/gopd/gOPD.js +0 -4
  262. package/node_modules/gopd/index.d.ts +0 -5
  263. package/node_modules/gopd/index.js +0 -15
  264. package/node_modules/gopd/package.json +0 -77
  265. package/node_modules/gopd/test/index.js +0 -36
  266. package/node_modules/gopd/tsconfig.json +0 -9
  267. package/node_modules/has-symbols/.eslintrc +0 -11
  268. package/node_modules/has-symbols/.github/FUNDING.yml +0 -12
  269. package/node_modules/has-symbols/.nycrc +0 -9
  270. package/node_modules/has-symbols/CHANGELOG.md +0 -91
  271. package/node_modules/has-symbols/LICENSE +0 -21
  272. package/node_modules/has-symbols/README.md +0 -46
  273. package/node_modules/has-symbols/index.d.ts +0 -3
  274. package/node_modules/has-symbols/index.js +0 -14
  275. package/node_modules/has-symbols/package.json +0 -111
  276. package/node_modules/has-symbols/shams.d.ts +0 -3
  277. package/node_modules/has-symbols/shams.js +0 -45
  278. package/node_modules/has-symbols/test/index.js +0 -22
  279. package/node_modules/has-symbols/test/shams/core-js.js +0 -29
  280. package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +0 -29
  281. package/node_modules/has-symbols/test/tests.js +0 -58
  282. package/node_modules/has-symbols/tsconfig.json +0 -10
  283. package/node_modules/hasown/.github/FUNDING.yml +0 -12
  284. package/node_modules/hasown/.nycrc +0 -13
  285. package/node_modules/hasown/CHANGELOG.md +0 -58
  286. package/node_modules/hasown/LICENSE +0 -21
  287. package/node_modules/hasown/README.md +0 -40
  288. package/node_modules/hasown/eslint.config.mjs +0 -6
  289. package/node_modules/hasown/index.d.ts +0 -3
  290. package/node_modules/hasown/index.js +0 -8
  291. package/node_modules/hasown/package.json +0 -91
  292. package/node_modules/hasown/tsconfig.json +0 -6
  293. package/node_modules/ip-address/LICENSE +0 -19
  294. package/node_modules/ip-address/README.md +0 -278
  295. package/node_modules/ip-address/dist/address-error.d.ts +0 -4
  296. package/node_modules/ip-address/dist/address-error.js +0 -12
  297. package/node_modules/ip-address/dist/address-error.js.map +0 -1
  298. package/node_modules/ip-address/dist/common.d.ts +0 -20
  299. package/node_modules/ip-address/dist/common.js +0 -67
  300. package/node_modules/ip-address/dist/common.js.map +0 -1
  301. package/node_modules/ip-address/dist/ip-address.d.ts +0 -7
  302. package/node_modules/ip-address/dist/ip-address.js +0 -35
  303. package/node_modules/ip-address/dist/ip-address.js.map +0 -1
  304. package/node_modules/ip-address/dist/ipv4.d.ts +0 -267
  305. package/node_modules/ip-address/dist/ipv4.js +0 -485
  306. package/node_modules/ip-address/dist/ipv4.js.map +0 -1
  307. package/node_modules/ip-address/dist/ipv6.d.ts +0 -489
  308. package/node_modules/ip-address/dist/ipv6.js +0 -1217
  309. package/node_modules/ip-address/dist/ipv6.js.map +0 -1
  310. package/node_modules/ip-address/dist/v4/constants.d.ts +0 -4
  311. package/node_modules/ip-address/dist/v4/constants.js +0 -8
  312. package/node_modules/ip-address/dist/v4/constants.js.map +0 -1
  313. package/node_modules/ip-address/dist/v6/constants.d.ts +0 -44
  314. package/node_modules/ip-address/dist/v6/constants.js +0 -81
  315. package/node_modules/ip-address/dist/v6/constants.js.map +0 -1
  316. package/node_modules/ip-address/dist/v6/helpers.d.ts +0 -18
  317. package/node_modules/ip-address/dist/v6/helpers.js +0 -54
  318. package/node_modules/ip-address/dist/v6/helpers.js.map +0 -1
  319. package/node_modules/ip-address/dist/v6/regular-expressions.d.ts +0 -5
  320. package/node_modules/ip-address/dist/v6/regular-expressions.js +0 -95
  321. package/node_modules/ip-address/dist/v6/regular-expressions.js.map +0 -1
  322. package/node_modules/ip-address/package.json +0 -88
  323. package/node_modules/is-promise/LICENSE +0 -19
  324. package/node_modules/is-promise/index.d.ts +0 -2
  325. package/node_modules/is-promise/index.js +0 -6
  326. package/node_modules/is-promise/index.mjs +0 -3
  327. package/node_modules/is-promise/package.json +0 -30
  328. package/node_modules/is-promise/readme.md +0 -33
  329. package/node_modules/math-intrinsics/.eslintrc +0 -16
  330. package/node_modules/math-intrinsics/.github/FUNDING.yml +0 -12
  331. package/node_modules/math-intrinsics/CHANGELOG.md +0 -24
  332. package/node_modules/math-intrinsics/LICENSE +0 -21
  333. package/node_modules/math-intrinsics/README.md +0 -50
  334. package/node_modules/math-intrinsics/abs.d.ts +0 -1
  335. package/node_modules/math-intrinsics/abs.js +0 -4
  336. package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +0 -3
  337. package/node_modules/math-intrinsics/constants/maxArrayLength.js +0 -4
  338. package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +0 -3
  339. package/node_modules/math-intrinsics/constants/maxSafeInteger.js +0 -5
  340. package/node_modules/math-intrinsics/constants/maxValue.d.ts +0 -3
  341. package/node_modules/math-intrinsics/constants/maxValue.js +0 -5
  342. package/node_modules/math-intrinsics/floor.d.ts +0 -1
  343. package/node_modules/math-intrinsics/floor.js +0 -4
  344. package/node_modules/math-intrinsics/isFinite.d.ts +0 -3
  345. package/node_modules/math-intrinsics/isFinite.js +0 -12
  346. package/node_modules/math-intrinsics/isInteger.d.ts +0 -3
  347. package/node_modules/math-intrinsics/isInteger.js +0 -16
  348. package/node_modules/math-intrinsics/isNaN.d.ts +0 -1
  349. package/node_modules/math-intrinsics/isNaN.js +0 -6
  350. package/node_modules/math-intrinsics/isNegativeZero.d.ts +0 -3
  351. package/node_modules/math-intrinsics/isNegativeZero.js +0 -6
  352. package/node_modules/math-intrinsics/max.d.ts +0 -1
  353. package/node_modules/math-intrinsics/max.js +0 -4
  354. package/node_modules/math-intrinsics/min.d.ts +0 -1
  355. package/node_modules/math-intrinsics/min.js +0 -4
  356. package/node_modules/math-intrinsics/mod.d.ts +0 -3
  357. package/node_modules/math-intrinsics/mod.js +0 -9
  358. package/node_modules/math-intrinsics/package.json +0 -86
  359. package/node_modules/math-intrinsics/pow.d.ts +0 -1
  360. package/node_modules/math-intrinsics/pow.js +0 -4
  361. package/node_modules/math-intrinsics/round.d.ts +0 -1
  362. package/node_modules/math-intrinsics/round.js +0 -4
  363. package/node_modules/math-intrinsics/sign.d.ts +0 -3
  364. package/node_modules/math-intrinsics/sign.js +0 -11
  365. package/node_modules/math-intrinsics/test/index.js +0 -192
  366. package/node_modules/math-intrinsics/tsconfig.json +0 -3
  367. package/node_modules/media-typer/HISTORY.md +0 -50
  368. package/node_modules/media-typer/LICENSE +0 -22
  369. package/node_modules/media-typer/README.md +0 -93
  370. package/node_modules/media-typer/index.js +0 -143
  371. package/node_modules/media-typer/package.json +0 -33
  372. package/node_modules/merge-descriptors/index.d.ts +0 -11
  373. package/node_modules/merge-descriptors/index.js +0 -26
  374. package/node_modules/merge-descriptors/license +0 -11
  375. package/node_modules/merge-descriptors/package.json +0 -50
  376. package/node_modules/merge-descriptors/readme.md +0 -55
  377. package/node_modules/mime-db/HISTORY.md +0 -541
  378. package/node_modules/mime-db/LICENSE +0 -23
  379. package/node_modules/mime-db/README.md +0 -109
  380. package/node_modules/mime-db/db.json +0 -9342
  381. package/node_modules/mime-db/index.js +0 -12
  382. package/node_modules/mime-db/package.json +0 -56
  383. package/node_modules/mime-types/HISTORY.md +0 -428
  384. package/node_modules/mime-types/LICENSE +0 -23
  385. package/node_modules/mime-types/README.md +0 -126
  386. package/node_modules/mime-types/index.js +0 -211
  387. package/node_modules/mime-types/mimeScore.js +0 -57
  388. package/node_modules/mime-types/package.json +0 -49
  389. package/node_modules/ms/index.js +0 -162
  390. package/node_modules/ms/license.md +0 -21
  391. package/node_modules/ms/package.json +0 -38
  392. package/node_modules/ms/readme.md +0 -59
  393. package/node_modules/negotiator/HISTORY.md +0 -114
  394. package/node_modules/negotiator/LICENSE +0 -24
  395. package/node_modules/negotiator/README.md +0 -212
  396. package/node_modules/negotiator/index.js +0 -83
  397. package/node_modules/negotiator/lib/charset.js +0 -169
  398. package/node_modules/negotiator/lib/encoding.js +0 -205
  399. package/node_modules/negotiator/lib/language.js +0 -179
  400. package/node_modules/negotiator/lib/mediaType.js +0 -294
  401. package/node_modules/negotiator/package.json +0 -43
  402. package/node_modules/object-inspect/.eslintrc +0 -53
  403. package/node_modules/object-inspect/.github/FUNDING.yml +0 -12
  404. package/node_modules/object-inspect/.nycrc +0 -13
  405. package/node_modules/object-inspect/CHANGELOG.md +0 -424
  406. package/node_modules/object-inspect/LICENSE +0 -21
  407. package/node_modules/object-inspect/example/all.js +0 -23
  408. package/node_modules/object-inspect/example/circular.js +0 -6
  409. package/node_modules/object-inspect/example/fn.js +0 -5
  410. package/node_modules/object-inspect/example/inspect.js +0 -10
  411. package/node_modules/object-inspect/index.js +0 -544
  412. package/node_modules/object-inspect/package-support.json +0 -20
  413. package/node_modules/object-inspect/package.json +0 -105
  414. package/node_modules/object-inspect/readme.markdown +0 -84
  415. package/node_modules/object-inspect/test/bigint.js +0 -58
  416. package/node_modules/object-inspect/test/browser/dom.js +0 -15
  417. package/node_modules/object-inspect/test/circular.js +0 -16
  418. package/node_modules/object-inspect/test/deep.js +0 -12
  419. package/node_modules/object-inspect/test/element.js +0 -53
  420. package/node_modules/object-inspect/test/err.js +0 -48
  421. package/node_modules/object-inspect/test/fakes.js +0 -29
  422. package/node_modules/object-inspect/test/fn.js +0 -76
  423. package/node_modules/object-inspect/test/global.js +0 -17
  424. package/node_modules/object-inspect/test/has.js +0 -15
  425. package/node_modules/object-inspect/test/holes.js +0 -15
  426. package/node_modules/object-inspect/test/indent-option.js +0 -271
  427. package/node_modules/object-inspect/test/inspect.js +0 -139
  428. package/node_modules/object-inspect/test/lowbyte.js +0 -12
  429. package/node_modules/object-inspect/test/number.js +0 -58
  430. package/node_modules/object-inspect/test/quoteStyle.js +0 -26
  431. package/node_modules/object-inspect/test/toStringTag.js +0 -40
  432. package/node_modules/object-inspect/test/undef.js +0 -12
  433. package/node_modules/object-inspect/test/values.js +0 -261
  434. package/node_modules/object-inspect/test-core-js.js +0 -26
  435. package/node_modules/object-inspect/util.inspect.js +0 -1
  436. package/node_modules/on-finished/HISTORY.md +0 -98
  437. package/node_modules/on-finished/LICENSE +0 -23
  438. package/node_modules/on-finished/README.md +0 -162
  439. package/node_modules/on-finished/index.js +0 -234
  440. package/node_modules/on-finished/package.json +0 -39
  441. package/node_modules/once/LICENSE +0 -15
  442. package/node_modules/once/README.md +0 -79
  443. package/node_modules/once/once.js +0 -42
  444. package/node_modules/once/package.json +0 -33
  445. package/node_modules/parseurl/HISTORY.md +0 -58
  446. package/node_modules/parseurl/LICENSE +0 -24
  447. package/node_modules/parseurl/README.md +0 -133
  448. package/node_modules/parseurl/index.js +0 -158
  449. package/node_modules/parseurl/package.json +0 -40
  450. package/node_modules/path-to-regexp/LICENSE +0 -21
  451. package/node_modules/path-to-regexp/Readme.md +0 -224
  452. package/node_modules/path-to-regexp/dist/index.d.ts +0 -147
  453. package/node_modules/path-to-regexp/dist/index.js +0 -431
  454. package/node_modules/path-to-regexp/dist/index.js.map +0 -1
  455. package/node_modules/path-to-regexp/package.json +0 -64
  456. package/node_modules/proxy-addr/HISTORY.md +0 -161
  457. package/node_modules/proxy-addr/LICENSE +0 -22
  458. package/node_modules/proxy-addr/README.md +0 -139
  459. package/node_modules/proxy-addr/index.js +0 -327
  460. package/node_modules/proxy-addr/package.json +0 -47
  461. package/node_modules/qs/.editorconfig +0 -46
  462. package/node_modules/qs/.github/FUNDING.yml +0 -12
  463. package/node_modules/qs/.github/SECURITY.md +0 -11
  464. package/node_modules/qs/.github/THREAT_MODEL.md +0 -78
  465. package/node_modules/qs/.nycrc +0 -13
  466. package/node_modules/qs/CHANGELOG.md +0 -822
  467. package/node_modules/qs/LICENSE.md +0 -29
  468. package/node_modules/qs/README.md +0 -758
  469. package/node_modules/qs/dist/qs.js +0 -141
  470. package/node_modules/qs/eslint.config.mjs +0 -57
  471. package/node_modules/qs/lib/formats.js +0 -23
  472. package/node_modules/qs/lib/index.js +0 -11
  473. package/node_modules/qs/lib/parse.js +0 -403
  474. package/node_modules/qs/lib/stringify.js +0 -363
  475. package/node_modules/qs/lib/utils.js +0 -342
  476. package/node_modules/qs/package.json +0 -94
  477. package/node_modules/qs/test/empty-keys-cases.js +0 -267
  478. package/node_modules/qs/test/parse.js +0 -1703
  479. package/node_modules/qs/test/stringify.js +0 -1448
  480. package/node_modules/qs/test/utils.js +0 -432
  481. package/node_modules/range-parser/HISTORY.md +0 -56
  482. package/node_modules/range-parser/LICENSE +0 -23
  483. package/node_modules/range-parser/README.md +0 -84
  484. package/node_modules/range-parser/index.js +0 -162
  485. package/node_modules/range-parser/package.json +0 -44
  486. package/node_modules/router/HISTORY.md +0 -228
  487. package/node_modules/router/LICENSE +0 -23
  488. package/node_modules/router/README.md +0 -416
  489. package/node_modules/router/index.js +0 -748
  490. package/node_modules/router/lib/layer.js +0 -247
  491. package/node_modules/router/lib/route.js +0 -242
  492. package/node_modules/router/package.json +0 -44
  493. package/node_modules/send/LICENSE +0 -23
  494. package/node_modules/send/README.md +0 -317
  495. package/node_modules/send/index.js +0 -997
  496. package/node_modules/send/package.json +0 -63
  497. package/node_modules/serve-static/LICENSE +0 -25
  498. package/node_modules/serve-static/README.md +0 -253
  499. package/node_modules/serve-static/index.js +0 -208
  500. package/node_modules/serve-static/package.json +0 -44
  501. package/node_modules/side-channel/.editorconfig +0 -9
  502. package/node_modules/side-channel/.eslintrc +0 -12
  503. package/node_modules/side-channel/.github/FUNDING.yml +0 -12
  504. package/node_modules/side-channel/.nycrc +0 -13
  505. package/node_modules/side-channel/CHANGELOG.md +0 -110
  506. package/node_modules/side-channel/LICENSE +0 -21
  507. package/node_modules/side-channel/README.md +0 -61
  508. package/node_modules/side-channel/index.d.ts +0 -14
  509. package/node_modules/side-channel/index.js +0 -43
  510. package/node_modules/side-channel/package.json +0 -85
  511. package/node_modules/side-channel/test/index.js +0 -104
  512. package/node_modules/side-channel/tsconfig.json +0 -9
  513. package/node_modules/side-channel-list/.editorconfig +0 -9
  514. package/node_modules/side-channel-list/.eslintrc +0 -11
  515. package/node_modules/side-channel-list/.github/FUNDING.yml +0 -12
  516. package/node_modules/side-channel-list/.nycrc +0 -13
  517. package/node_modules/side-channel-list/CHANGELOG.md +0 -36
  518. package/node_modules/side-channel-list/LICENSE +0 -21
  519. package/node_modules/side-channel-list/README.md +0 -62
  520. package/node_modules/side-channel-list/index.d.ts +0 -13
  521. package/node_modules/side-channel-list/index.js +0 -111
  522. package/node_modules/side-channel-list/list.d.ts +0 -14
  523. package/node_modules/side-channel-list/package.json +0 -77
  524. package/node_modules/side-channel-list/test/index.js +0 -154
  525. package/node_modules/side-channel-list/tsconfig.json +0 -9
  526. package/node_modules/side-channel-map/.editorconfig +0 -9
  527. package/node_modules/side-channel-map/.eslintrc +0 -11
  528. package/node_modules/side-channel-map/.github/FUNDING.yml +0 -12
  529. package/node_modules/side-channel-map/.nycrc +0 -13
  530. package/node_modules/side-channel-map/CHANGELOG.md +0 -22
  531. package/node_modules/side-channel-map/LICENSE +0 -21
  532. package/node_modules/side-channel-map/README.md +0 -62
  533. package/node_modules/side-channel-map/index.d.ts +0 -15
  534. package/node_modules/side-channel-map/index.js +0 -68
  535. package/node_modules/side-channel-map/package.json +0 -80
  536. package/node_modules/side-channel-map/test/index.js +0 -114
  537. package/node_modules/side-channel-map/tsconfig.json +0 -9
  538. package/node_modules/side-channel-weakmap/.editorconfig +0 -9
  539. package/node_modules/side-channel-weakmap/.eslintrc +0 -12
  540. package/node_modules/side-channel-weakmap/.github/FUNDING.yml +0 -12
  541. package/node_modules/side-channel-weakmap/.nycrc +0 -13
  542. package/node_modules/side-channel-weakmap/CHANGELOG.md +0 -28
  543. package/node_modules/side-channel-weakmap/LICENSE +0 -21
  544. package/node_modules/side-channel-weakmap/README.md +0 -62
  545. package/node_modules/side-channel-weakmap/index.d.ts +0 -15
  546. package/node_modules/side-channel-weakmap/index.js +0 -84
  547. package/node_modules/side-channel-weakmap/package.json +0 -87
  548. package/node_modules/side-channel-weakmap/test/index.js +0 -114
  549. package/node_modules/side-channel-weakmap/tsconfig.json +0 -9
  550. package/node_modules/type-is/HISTORY.md +0 -292
  551. package/node_modules/type-is/LICENSE +0 -23
  552. package/node_modules/type-is/README.md +0 -198
  553. package/node_modules/type-is/index.js +0 -240
  554. package/node_modules/type-is/package.json +0 -51
  555. package/node_modules/wrappy/LICENSE +0 -15
  556. package/node_modules/wrappy/README.md +0 -36
  557. package/node_modules/wrappy/package.json +0 -29
  558. package/node_modules/wrappy/wrappy.js +0 -33
@@ -1,278 +0,0 @@
1
- [![CircleCI](https://dl.circleci.com/status-badge/img/circleci/9fJmTZfn8d8p7GtVt688PY/JjriGjhcxBD6zYKygMZaet/tree/master.svg?style=svg&circle-token=7baede7efd3db5f1f25fb439e97d5f695ff76318)](https://dl.circleci.com/status-badge/redirect/circleci/9fJmTZfn8d8p7GtVt688PY/JjriGjhcxBD6zYKygMZaet/tree/master)
2
- [![codecov]](https://codecov.io/github/beaugunderson/ip-address?branch=master)
3
- [![downloads]](https://www.npmjs.com/package/ip-address)
4
- [![npm]](https://www.npmjs.com/package/ip-address)
5
-
6
- [codecov]: https://codecov.io/github/beaugunderson/ip-address/coverage.svg?branch=master
7
- [downloads]: https://img.shields.io/npm/dm/ip-address.svg
8
- [npm]: https://img.shields.io/npm/v/ip-address.svg
9
-
10
- ## ip-address
11
-
12
- `ip-address` is a library for validating and manipulating IPv4 and IPv6 addresses in JavaScript and TypeScript.
13
-
14
- ### Install
15
-
16
- ```sh
17
- npm install ip-address
18
- ```
19
-
20
- ### Examples
21
-
22
- ```ts
23
- import { Address4, Address6 } from 'ip-address';
24
-
25
- // Validation
26
- Address4.isValid('192.168.1.1'); // true
27
- Address6.isValid('2001:db8::1'); // true
28
- Address6.isValid('not an address'); // false
29
-
30
- // Parsing (throws AddressError on invalid input)
31
- const v4 = new Address4('192.168.1.1/24');
32
- const v6 = new Address6('2001:db8::1/64');
33
-
34
- // Subnet membership
35
- const host = new Address4('192.168.1.42');
36
- const network = new Address4('192.168.1.0/24');
37
- host.isInSubnet(network); // true
38
-
39
- // Subnet range
40
- network.startAddress().correctForm(); // '192.168.1.0'
41
- network.endAddress().correctForm(); // '192.168.1.255'
42
-
43
- // Strict network-address check (host bits must be zero).
44
- // isValid() accepts CIDRs with host bits set — '192.168.1.5/24' is a valid
45
- // host-with-subnet, but it isn't a network address.
46
- const cidr = new Address4('192.168.1.5/24');
47
- Address4.isValid('192.168.1.5/24'); // true
48
- cidr.correctForm() === cidr.startAddress().correctForm(); // false
49
-
50
- // Address properties
51
- const link = new Address6('fe80::1');
52
- link.isLinkLocal(); // true
53
- link.isMulticast(); // false
54
- link.isLoopback(); // false
55
-
56
- new Address4('192.168.1.1').isPrivate(); // true (RFC 1918)
57
- new Address6('fc00::1').isULA(); // true (RFC 4193)
58
-
59
- // Numeric and byte representations
60
- v4.bigInt(); // 3232235777n
61
- v4.toArray(); // [192, 168, 1, 1]
62
- v6.canonicalForm(); // '2001:0db8:0000:0000:0000:0000:0000:0001'
63
-
64
- // Embedded IPv4 + Teredo
65
- const teredo = new Address6('2001:0:ce49:7601:e866:efff:62c3:fffe');
66
- teredo.inspectTeredo().client4; // '157.60.0.1'
67
-
68
- // Parse host + port from a URL
69
- Address6.fromURL('http://[2001:db8::1]:8080/').port; // 8080
70
- ```
71
-
72
- ### Features
73
-
74
- - Written in TypeScript with full type definitions; usable from CommonJS and ESM
75
- - Zero runtime dependencies
76
- - Parses all standard IPv4 and IPv6 notations, including subnets and zones
77
- - Parses IPv6 hosts (and ports) from URLs via `Address6.fromURL(url)`
78
- - Subnet membership checks (`isInSubnet`) and range queries (`startAddress` / `endAddress`)
79
- - Special-property checks: private (RFC 1918) / ULA (RFC 4193), loopback, link-local, multicast, broadcast, unspecified, CGNAT, documentation, Teredo, 6to4, v4-in-v6
80
- - Decodes [Teredo](http://en.wikipedia.org/wiki/Teredo_tunneling#IPv6_addressing) and 6to4 tunneling information
81
- - Conversions: canonical/correct form, hex, binary, decimal, byte arrays, BigInt, `in-addr.arpa` / `ip6.arpa`
82
- - Runs in Node.js and the browser
83
- - Thousands of test cases
84
-
85
- ### Terminology
86
-
87
- A few terms used throughout the API can be confusing if you haven't worked deeply with IPv6 before:
88
-
89
- - **Correct form** — the shortest valid representation, per [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros stripped, the longest run of zero groups collapsed to `::`, and hex digits lowercased (e.g. `2001:db8::1`). This is what most software displays.
90
- - **Canonical form** — the fully expanded representation: all 8 groups, each padded to 4 hex digits, no `::` collapsing (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and byte-exact comparison.
91
- - **Subnet** — the network portion of an address expressed as a CIDR prefix length (e.g. `/24` for IPv4, `/64` for IPv6). `startAddress()` / `endAddress()` return the bounds of the subnet's range.
92
- - **Zone** — the IPv6 scope identifier appended after `%`, used to disambiguate link-local addresses across interfaces (e.g. `fe80::1%eth0`).
93
- - **v4-in-v6** — mixed notation that embeds an IPv4 address as the last 32 bits of an IPv6 address, e.g. `::ffff:192.168.0.1`. Used for IPv4-mapped IPv6 addresses.
94
- - **Teredo** — a tunneling protocol that encodes an IPv4 endpoint, port, and flags inside a `2001::/32` IPv6 address. `inspectTeredo()` decodes those fields.
95
- - **6to4** — a tunneling protocol that embeds an IPv4 address as the second 16 bits of a `2002::/16` IPv6 address. `inspect6to4()` decodes the embedded v4 address.
96
-
97
- ### API
98
-
99
- <!-- API:START -->
100
-
101
- #### AddressError
102
-
103
- **Constructor**
104
-
105
- - `new AddressError(message: string, parseMessage?: string): AddressError`
106
-
107
- **Properties**
108
-
109
- - `parseMessage: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/address-error.ts#L2)
110
-
111
- #### Address4
112
-
113
- Represents an IPv4 address
114
-
115
- **Constructor**
116
-
117
- - `new Address4(address: string): Address4`
118
-
119
- **Static methods**
120
-
121
- - `static isValid(address: string): boolean` — Returns true if the given string is a valid IPv4 address (with optional CIDR subnet), false otherwise. Host bits in the subnet portion are allowed (e.g. `192.168.1.5/24` is valid); for strict network-address validation compare `correctForm()` to `startAddress().correctForm()`, or use `networkForm()`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L53)
122
- - `static fromAddressAndMask(address: string, mask: string): Address4` — Construct an `Address4` from an address and a dotted-decimal subnet mask given as separate strings (e.g. as returned by Node's `os.networkInterfaces()`). Throws `AddressError` if the mask is non-contiguous (e.g. `255.0.255.0`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L104)
123
- - `static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address4` — Construct an `Address4` from an address and a Cisco-style wildcard mask given as separate strings (e.g. `0.0.0.255` for a `/24`). The wildcard mask is the bitwise inverse of the subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g. `0.255.0.255`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L118)
124
- - `static fromWildcard(input: string): Address4` — Construct an `Address4` from a wildcard pattern with trailing `*` octets. The number of trailing wildcards determines the prefix length: each `*` represents 8 bits. Only trailing whole-octet wildcards are supported. Partial-octet wildcards (e.g. `192.168.0.1*`) and interior wildcards (e.g. `192.*.0.1`) throw `AddressError`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L140)
125
- - `static fromHex(hex: string): Address4` — Converts a hex string to an IPv4 address object. Accepts 8 hex digits with optional `:` separators (e.g. `'7f000001'` or `'7f:00:00:01'`). Throws `AddressError` for any other length or for non-hex characters. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L175)
126
- - `static fromInteger(integer: number): Address4` — Converts an integer into a IPv4 address object. The integer must be a non-negative safe integer in the range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L198)
127
- - `static fromArpa(arpaFormAddress: string): Address4` — Return an address from in-addr.arpa form [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L214)
128
- - `static fromBigInt(bigInt: bigint): Address4` — Converts a BigInt to a v4 address object. The value must be in the range `[0, 2**32 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L361)
129
- - `static fromByteArray(bytes: number[]): Address4` — Convert a byte array to an Address4 object. To convert from a Node.js `Buffer`, spread it: `Address4.fromByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L376)
130
- - `static fromUnsignedByteArray(bytes: number[]): Address4` — Convert an unsigned byte array to an Address4 object [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L396)
131
-
132
- **Instance methods**
133
-
134
- - `parse(address: string): string[]` — Parses an IPv4 address string into its four octet groups and stores the result on `this.parsedAddress`. Called automatically by the constructor; you typically don't need to call it directly. Throws `AddressError` if the input is not a valid IPv4 address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L70)
135
- - `correctForm(): string` — Returns the address in correct form: octets joined with `.` and any leading zeros stripped (e.g. `192.168.1.1`). For IPv4 this matches the canonical dotted-decimal representation. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L85)
136
- - `toHex(): string` — Converts an IPv4 address object to a hex string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L227)
137
- - `toArray(): number[]` — Converts an IPv4 address object to an array of bytes. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toArray())`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L237)
138
- - `toGroup6(): string` — Converts an IPv4 address object to an IPv6 address group [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L245)
139
- - `bigInt(): bigint` — Returns the address as a `bigint` [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L264)
140
- - `startAddress(): Address4` — The first address in the range given by this address' subnet. Often referred to as the Network Address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L281)
141
- - `startAddressExclusive(): Address4` — The first host address in the range given by this address's subnet ie the first address after the Network Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L290)
142
- - `endAddress(): Address4` — The last address in the range given by this address' subnet Often referred to as the Broadcast [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L308)
143
- - `endAddressExclusive(): Address4` — The last host address in the range given by this address's subnet ie the last address prior to the Broadcast Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L317)
144
- - `subnetMaskAddress(): Address4` — The dotted-decimal form of the subnet mask, e.g. `255.255.240.0` for a `/20`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L327)
145
- - `wildcardMask(): Address4` — The Cisco-style wildcard mask, e.g. `0.0.0.255` for a `/24`. This is the bitwise inverse of `subnetMaskAddress()`. Returns an `Address4`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L339)
146
- - `networkForm(): string` — The network address in CIDR string form, e.g. `192.168.1.0/24` for `192.168.1.5/24`. For an address with no explicit subnet the prefix is `/32`, e.g. `networkForm()` on `192.168.1.5` returns `192.168.1.5/32`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L351)
147
- - `mask(mask?: number): string` — Returns the first n bits of the address, defaulting to the subnet mask [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L410)
148
- - `getBitsBase2(start: number, end: number): string` — Returns the bits in the given range as a base-2 string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L422)
149
- - `reverseForm(options?: ReverseFormOptions): string` — Return the reversed ip6.arpa form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L432)
150
- - `isMulticast(): boolean` — Returns true if the given address is a multicast address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L456)
151
- - `isPrivate(): boolean` — Returns true if the address is in one of the [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private address ranges (`10.0.0.0/8`, `172.16.0.0/12`, `192.168.0.0/16`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L464)
152
- - `isLoopback(): boolean` — Returns true if the address is in the loopback range `127.0.0.0/8` ([RFC 1122](https://datatracker.ietf.org/doc/html/rfc1122)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L472)
153
- - `isLinkLocal(): boolean` — Returns true if the address is in the link-local range `169.254.0.0/16` ([RFC 3927](https://datatracker.ietf.org/doc/html/rfc3927)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L480)
154
- - `isUnspecified(): boolean` — Returns true if the address is the unspecified address `0.0.0.0`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L488)
155
- - `isBroadcast(): boolean` — Returns true if the address is the limited broadcast address `255.255.255.255` ([RFC 919](https://datatracker.ietf.org/doc/html/rfc919)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L496)
156
- - `isCGNAT(): boolean` — Returns true if the address is in the carrier-grade NAT range `100.64.0.0/10` ([RFC 6598](https://datatracker.ietf.org/doc/html/rfc6598)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L504)
157
- - `binaryZeroPad(): string` — Returns a zero-padded base-2 string representation of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L512)
158
- - `groupForV6(): string` — Groups an IPv4 address for inclusion at the end of an IPv6 address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L523)
159
-
160
- **Properties**
161
-
162
- - `address: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L14)
163
- - `addressMinusSuffix: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L15)
164
- - `groups: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L16)
165
- - `parsedAddress: string[]` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L17)
166
- - `parsedSubnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L18)
167
- - `subnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L19)
168
- - `subnetMask: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L20)
169
- - `v4: boolean` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L21)
170
- - `isCorrect: (this: Address4 | Address6) => boolean` — Returns true if the address is correct, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L93)
171
- - `isInSubnet: (this: Address4 | Address6, address: Address4 | Address6) => boolean` — Returns true if the given address is in the subnet of the current address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv4.ts#L450)
172
-
173
- #### Address6
174
-
175
- Represents an IPv6 address
176
-
177
- **Constructor**
178
-
179
- - `new Address6(address: string, optionalGroups?: number): Address6`
180
-
181
- **Static methods**
182
-
183
- - `static isValid(address: string): boolean` — Returns true if the given string is a valid IPv6 address (with optional CIDR subnet and zone identifier), false otherwise. Host bits in the subnet portion are allowed (e.g. `2001:db8::1/32` is valid); for strict network-address validation compare `correctForm()` to `startAddress().correctForm()`, or use `networkForm()`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L163)
184
- - `static fromBigInt(bigInt: bigint): Address6` — Convert a BigInt to a v6 address object. The value must be in the range `[0, 2**128 - 1]`; otherwise `AddressError` is thrown. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L184)
185
- - `static fromURL(url: string): { error: string; address: null; port: null } | { error?: undefined; address: Address6; port: number | null }` — Parse a URL (with optional bracketed host and port) into an address and port. Returns either `{ address, port }` on success or `{ error, address: null, port: null }` if the URL could not be parsed. Ports are returned as numbers (or `null` if absent or out of range). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L209)
186
- - `static fromAddressAndMask(address: string, mask: string): Address6` — Construct an `Address6` from an address and a hex subnet mask given as separate strings (e.g. as returned by Node's `os.networkInterfaces()`). Throws `AddressError` if the mask is non-contiguous (e.g. `ffff::ffff`). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L273)
187
- - `static fromAddressAndWildcardMask(address: string, wildcardMask: string): Address6` — Construct an `Address6` from an address and a Cisco-style wildcard mask given as separate strings (e.g. `::ffff:ffff:ffff:ffff` for a `/64`). The wildcard mask is the bitwise inverse of the subnet mask. Throws `AddressError` if the mask is non-contiguous. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L287)
188
- - `static fromWildcard(input: string): Address6` — Construct an `Address6` from a wildcard pattern with trailing `*` groups. The number of trailing wildcards determines the prefix length: each `*` represents 16 bits. `::` is expanded to zero groups (not wildcards) before evaluating trailing wildcards. Only trailing whole-group wildcards are supported. Partial-group wildcards (e.g. `2001:db8::0*`) and interior wildcards (e.g. `*::1`) throw `AddressError`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L310)
189
- - `static fromAddress4(address: string): Address6` — Create an IPv6-mapped address given an IPv4 address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L371)
190
- - `static fromArpa(arpaFormAddress: string): Address6` — Return an address from ip6.arpa form [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L387)
191
- - `static fromAddress4Nat64(address: string, prefix: string): Address6` — Embed an IPv4 address into a NAT64 IPv6 address using the encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). The default prefix is the well-known prefix `64:ff9b::/96`. The prefix length must be one of 32, 40, 48, 56, 64, or 96; for prefixes shorter than /64 the IPv4 octets are split around the reserved bits 64–71. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1048)
192
- - `static fromByteArray(bytes: any[]): Address6` — Convert a byte array to an Address6 object. To convert from a Node.js `Buffer`, spread it: `Address6.fromByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1154)
193
- - `static fromUnsignedByteArray(bytes: any[]): Address6` — Convert an unsigned byte array to an Address6 object. To convert from a Node.js `Buffer`, spread it: `Address6.fromUnsignedByteArray([...buf])`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1164)
194
-
195
- **Instance methods**
196
-
197
- - `microsoftTranscription(): string` — Return the Microsoft UNC transcription of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L413)
198
- - `mask(mask?: number): string` — Return the first n bits of the address, defaulting to the subnet mask [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L422)
199
- - `possibleSubnets(subnetSize?: number): string` — Return the number of possible subnets of a given size in the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L432)
200
- - `startAddress(): Address6` — The first address in the range given by this address' subnet Often referred to as the Network Address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L457)
201
- - `startAddressExclusive(): Address6` — The first host address in the range given by this address's subnet ie the first address after the Network Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L466)
202
- - `endAddress(): Address6` — The last address in the range given by this address' subnet Often referred to as the Broadcast [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L484)
203
- - `endAddressExclusive(): Address6` — The last host address in the range given by this address's subnet ie the last address prior to the Broadcast Address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L493)
204
- - `subnetMaskAddress(): Address6` — The hex form of the subnet mask, e.g. `ffff:ffff:ffff:ffff::` for a `/64`. Returns an `Address6`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L503)
205
- - `wildcardMask(): Address6` — The Cisco-style wildcard mask, e.g. `::ffff:ffff:ffff:ffff` for a `/64`. This is the bitwise inverse of `subnetMaskAddress()`. Returns an `Address6`; call `.correctForm()` for the string. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L515)
206
- - `networkForm(): string` — The network address in CIDR string form, e.g. `2001:db8::/32` for `2001:db8::1/32`. For an address with no explicit subnet the prefix is `/128`, e.g. `networkForm()` on `2001:db8::1` returns `2001:db8::1/128`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L528)
207
- - `getScope(): string` — Return the scope of the address. The 4-bit scope field ([RFC 4291 §2.7](https://datatracker.ietf.org/doc/html/rfc4291#section-2.7)) is only defined for multicast addresses; for unicast addresses the scope is derived from the address type per [RFC 4007 §6](https://datatracker.ietf.org/doc/html/rfc4007#section-6). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L540)
208
- - `getType(): string` — Return the type of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L567)
209
- - `getBits(start: number, end: number): bigint` — Return the bits in the given range as a BigInt [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L582)
210
- - `getBitsBase2(start: number, end: number): string` — Return the bits in the given range as a base-2 string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L590)
211
- - `getBitsBase16(start: number, end: number): string` — Return the bits in the given range as a base-16 string [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L598)
212
- - `getBitsPastSubnet(): string` — Return the bits that are set past the subnet mask length [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L614)
213
- - `reverseForm(options?: ReverseFormOptions): string` — Return the reversed ip6.arpa form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L624)
214
- - `correctForm(): string` — Returns the address in correct form, per [RFC 5952](https://datatracker.ietf.org/doc/html/rfc5952): leading zeros stripped, the longest run of zero groups collapsed to `::`, and hex digits lowercased (e.g. `2001:db8::1`). This is the recommended form for display. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L659)
215
- - `binaryZeroPad(): string` — Return a zero-padded base-2 string representation of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L721)
216
- - `parse4in6(address: string): string` — Parses a v4-in-v6 string (e.g. `::ffff:192.168.0.1`) by extracting the trailing IPv4 address into `this.address4` / `this.parsedAddress4` and returning the address with the v4 portion converted to two v6 groups. Used internally by `parse()`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L735)
217
- - `parse(address: string): string[]` — Parses an IPv6 address string into its 8 hexadecimal groups (expanding any `::` elision and any trailing v4-in-v6 portion) and stores the result on `this.parsedAddress`. Called automatically by the constructor; you typically don't need to call it directly. Throws `AddressError` if the input is malformed. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L783)
218
- - `canonicalForm(): string` — Returns the canonical (fully expanded) form of the address: all 8 groups, each padded to 4 hex digits, with no `::` collapsing (e.g. `2001:0db8:0000:0000:0000:0000:0000:0001`). Useful for sorting and byte-exact comparison. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L863)
219
- - `decimal(): string` — Return the decimal form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L871)
220
- - `bigInt(): bigint` — Return the address as a BigInt [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L879)
221
- - `to4(): Address4` — Return the last two groups of this address as an IPv4 address string. If this address carries a CIDR prefix that covers the trailing 32 bits (i.e. `subnetMask >= 96`), the resulting `Address4` inherits the corresponding v4 prefix (`subnetMask - 96`); otherwise it defaults to `/32`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L894)
222
- - `to4in6(): string` — Return the v4-in-v6 form of the address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L916)
223
- - `inspectTeredo(): TeredoProperties` — Decodes the Teredo tunneling fields embedded in this address. Returns the Teredo prefix, server IPv4, client IPv4, raw flag bits, cone-NAT flag, UDP port, and Microsoft-format flag breakdown (reserved, universal/local, group/individual, nonce). Only meaningful for addresses in `2001::/32`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L937)
224
- - `inspect6to4(): SixToFourProperties` — Decodes the 6to4 tunneling fields embedded in this address. Returns the 6to4 prefix and the embedded IPv4 gateway address. Only meaningful for addresses in `2002::/16`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1002)
225
- - `to6to4(): Address6 | null` — Return a v6 6to4 address from a v6 v4inv6 address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1022)
226
- - `toAddress4Nat64(prefix: string): Address4 | null` — Extract the embedded IPv4 address from a NAT64 IPv6 address using the encoding defined by [RFC 6052](https://datatracker.ietf.org/doc/html/rfc6052). The default prefix is the well-known prefix `64:ff9b::/96`. Returns `null` if this address is not contained within the given prefix. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1089)
227
- - `toByteArray(): number[]` — Return a byte array. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toByteArray())`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1124)
228
- - `toUnsignedByteArray(): number[]` — Return an unsigned byte array. To get a Node.js `Buffer`, wrap the result: `Buffer.from(address.toUnsignedByteArray())`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1144)
229
- - `isCanonical(): boolean` — Returns true if the address is in the canonical form, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1195)
230
- - `isLinkLocal(): boolean` — Returns true if the address is a link local address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1203)
231
- - `isMulticast(): boolean` — Returns true if the address is a multicast address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1219)
232
- - `is4(): boolean` — Returns true if the address was written in v4-in-v6 dotted-quad notation (e.g. `::ffff:127.0.0.1`), false otherwise. This is a notation-level flag and does not reflect whether the address bits lie in the IPv4-mapped (`::ffff:0:0/96`) subnet — for that, see isMapped4. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1231)
233
- - `isMapped4(): boolean` — Returns true if the address is an IPv4-mapped IPv6 address in `::ffff:0:0/96` ([RFC 4291 §2.5.5.2](https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.2)), false otherwise. Unlike is4, this checks the underlying address bits rather than the textual notation, so `::ffff:127.0.0.1` and `::ffff:7f00:1` both return true. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1243)
234
- - `isTeredo(): boolean` — Returns true if the address is a Teredo address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1251)
235
- - `is6to4(): boolean` — Returns true if the address is a 6to4 address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1259)
236
- - `isLoopback(): boolean` — Returns true if the address is a loopback address, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1267)
237
- - `isULA(): boolean` — Returns true if the address is a Unique Local Address in `fc00::/7` ([RFC 4193](https://datatracker.ietf.org/doc/html/rfc4193)). ULAs are the IPv6 equivalent of IPv4 [RFC 1918](https://datatracker.ietf.org/doc/html/rfc1918) private addresses. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1275)
238
- - `isUnspecified(): boolean` — Returns true if the address is the unspecified address `::`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1283)
239
- - `isDocumentation(): boolean` — Returns true if the address is in the documentation prefix `2001:db8::/32` ([RFC 3849](https://datatracker.ietf.org/doc/html/rfc3849)). [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1291)
240
- - `href(optionalPort?: string | number): string` — Returns the address as an HTTP URL with the host bracketed, e.g. `http://[2001:db8::1]/`. If `optionalPort` is provided it is appended, e.g. `http://[2001:db8::1]:8080/`. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1302)
241
- - `link(options?: { className?: string; prefix?: string; v4?: boolean }): string` — Returns an HTML `<a>` element whose `href` encodes the address in a URL hash fragment (default prefix `/#address=`). Useful for linking between pages of an address-inspector UI. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1320)
242
- - `group(): string` — Groups an address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1360)
243
- - `regularExpressionString(this: Address6, substringSearch: boolean): string` — Generate a regular expression string that can be used to find or validate all variations of this address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1412)
244
- - `regularExpression(this: Address6, substringSearch: boolean): RegExp` — Generate a regular expression that can be used to find or validate all variations of this address. [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1466)
245
-
246
- **Properties**
247
-
248
- - `address4: Address4` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L98)
249
- - `address: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L99)
250
- - `addressMinusSuffix: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L100)
251
- - `elidedGroups: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L101)
252
- - `elisionBegin: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L102)
253
- - `elisionEnd: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L103)
254
- - `groups: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L104)
255
- - `parsedAddress4: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L105)
256
- - `parsedAddress: string[]` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L106)
257
- - `parsedSubnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L107)
258
- - `subnet: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L108)
259
- - `subnetMask: number` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L109)
260
- - `v4: boolean` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L110)
261
- - `zone: string` — [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L111)
262
- - `isInSubnet: (this: Address4 | Address6, address: Address4 | Address6) => boolean` — Returns true if the given address is in the subnet of the current address [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1183)
263
- - `isCorrect: (this: Address4 | Address6) => boolean` — Returns true if the address is correct, false otherwise [src](https://github.com/beaugunderson/ip-address/blob/master/src/ipv6.ts#L1189)
264
-
265
- <!-- API:END -->
266
-
267
- ### Used by
268
-
269
- `ip-address` is downloaded ~66 million times per week, mostly via the Node proxy/agent ecosystem. The dependency chain runs through a handful of widely-used packages:
270
-
271
- - [**socks**](https://github.com/JoshGlazebrook/socks) (~53M weekly) — SOCKS4/5 client for Node; depends on `ip-address` directly. The single biggest source of downloads.
272
- - [**socks-proxy-agent**](https://github.com/TooTallNate/proxy-agents/tree/main/packages/socks-proxy-agent) (~57M weekly) — `http.Agent` for SOCKS proxies; depends on `socks`. Bundled by virtually every CLI that respects `HTTPS_PROXY`.
273
- - [**npm**](https://github.com/npm/cli) and [**pnpm**](https://github.com/pnpm/pnpm) — both bundle `socks-proxy-agent` through their HTTP fetch stack (`make-fetch-happen` → `@npmcli/agent`), so every Node install on the planet pulls in `ip-address` as a transitive dependency.
274
- - [**Puppeteer**](https://github.com/puppeteer/puppeteer) — `@puppeteer/browsers` uses `proxy-agent` for browser-binary downloads, which routes through `socks-proxy-agent` → `socks` → `ip-address`.
275
- - [**proxy-agent**](https://github.com/TooTallNate/proxy-agents/tree/main/packages/proxy-agent) (~28M weekly) and [**pac-proxy-agent**](https://github.com/TooTallNate/proxy-agents/tree/main/packages/pac-proxy-agent) (~27M weekly) — auto-detecting proxy agents (HTTP/HTTPS/SOCKS/PAC) used widely in scraping, headless-browser, and CI tooling.
276
- - [**cacache**](https://github.com/npm/cacache) (~44M weekly) — npm's content-addressable cache; pulls in the same fetch stack.
277
-
278
- Beyond the proxy chain, `ip-address` has been used by Juniper Networks' Contrail, Ably's proxy-protocol implementation, Rackspace's serialization framework, IPFS, and the [SwitchyOmega](https://github.com/FelisCatus/SwitchyOmega) Chrome extension, among many others.
@@ -1,4 +0,0 @@
1
- export declare class AddressError extends Error {
2
- parseMessage?: string;
3
- constructor(message: string, parseMessage?: string);
4
- }
@@ -1,12 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.AddressError = void 0;
4
- class AddressError extends Error {
5
- constructor(message, parseMessage) {
6
- super(message);
7
- this.name = 'AddressError';
8
- this.parseMessage = parseMessage;
9
- }
10
- }
11
- exports.AddressError = AddressError;
12
- //# sourceMappingURL=address-error.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"address-error.js","sourceRoot":"","sources":["../src/address-error.ts"],"names":[],"mappings":";;;AAAA,MAAa,YAAa,SAAQ,KAAK;IAGrC,YAAY,OAAe,EAAE,YAAqB;QAChD,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,IAAI,GAAG,cAAc,CAAC;QAE3B,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC;IACnC,CAAC;CACF;AAVD,oCAUC","sourcesContent":["export class AddressError extends Error {\n parseMessage?: string;\n\n constructor(message: string, parseMessage?: string) {\n super(message);\n\n this.name = 'AddressError';\n\n this.parseMessage = parseMessage;\n }\n}\n"]}
@@ -1,20 +0,0 @@
1
- import { Address4 } from './ipv4';
2
- import { Address6 } from './ipv6';
3
- export interface ReverseFormOptions {
4
- omitSuffix?: boolean;
5
- }
6
- export declare function isInSubnet(this: Address4 | Address6, address: Address4 | Address6): boolean;
7
- export declare function isCorrect(defaultBits: number): (this: Address4 | Address6) => boolean;
8
- /**
9
- * Returns the prefix length (number of leading 1 bits) of a contiguous
10
- * subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g.
11
- * `255.0.255.0`).
12
- */
13
- export declare function prefixLengthFromMask(value: bigint, totalBits: number): number;
14
- export declare function numberToPaddedHex(number: number): string;
15
- export declare function stringToPaddedHex(numberString: string): string;
16
- /**
17
- * @param binaryValue Binary representation of a value (e.g. `10`)
18
- * @param position Byte position, where 0 is the least significant bit
19
- */
20
- export declare function testBit(binaryValue: string, position: number): boolean;
@@ -1,67 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isInSubnet = isInSubnet;
4
- exports.isCorrect = isCorrect;
5
- exports.prefixLengthFromMask = prefixLengthFromMask;
6
- exports.numberToPaddedHex = numberToPaddedHex;
7
- exports.stringToPaddedHex = stringToPaddedHex;
8
- exports.testBit = testBit;
9
- const address_error_1 = require("./address-error");
10
- function isInSubnet(address) {
11
- if (this.subnetMask < address.subnetMask) {
12
- return false;
13
- }
14
- if (this.mask(address.subnetMask) === address.mask()) {
15
- return true;
16
- }
17
- return false;
18
- }
19
- function isCorrect(defaultBits) {
20
- return function () {
21
- if (this.addressMinusSuffix !== this.correctForm()) {
22
- return false;
23
- }
24
- if (this.subnetMask === defaultBits && !this.parsedSubnet) {
25
- return true;
26
- }
27
- return this.parsedSubnet === String(this.subnetMask);
28
- };
29
- }
30
- /**
31
- * Returns the prefix length (number of leading 1 bits) of a contiguous
32
- * subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g.
33
- * `255.0.255.0`).
34
- */
35
- function prefixLengthFromMask(value, totalBits) {
36
- const binary = value.toString(2).padStart(totalBits, '0');
37
- if (binary.length > totalBits) {
38
- throw new address_error_1.AddressError('Invalid subnet mask.');
39
- }
40
- const firstZero = binary.indexOf('0');
41
- if (firstZero === -1) {
42
- return totalBits;
43
- }
44
- if (binary.slice(firstZero).includes('1')) {
45
- throw new address_error_1.AddressError('Invalid subnet mask.');
46
- }
47
- return firstZero;
48
- }
49
- function numberToPaddedHex(number) {
50
- return number.toString(16).padStart(2, '0');
51
- }
52
- function stringToPaddedHex(numberString) {
53
- return numberToPaddedHex(parseInt(numberString, 10));
54
- }
55
- /**
56
- * @param binaryValue Binary representation of a value (e.g. `10`)
57
- * @param position Byte position, where 0 is the least significant bit
58
- */
59
- function testBit(binaryValue, position) {
60
- const { length } = binaryValue;
61
- if (position > length) {
62
- return false;
63
- }
64
- const positionInString = length - position;
65
- return binaryValue.substring(positionInString, positionInString + 1) === '1';
66
- }
67
- //# sourceMappingURL=common.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;AAQA,gCAUC;AAED,8BAYC;AAOD,oDAkBC;AAED,8CAEC;AAED,8CAEC;AAMD,0BASC;AA9ED,mDAA+C;AAM/C,SAAgB,UAAU,CAA4B,OAA4B;IAChF,IAAI,IAAI,CAAC,UAAU,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC;QACzC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,KAAK,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC;QACrD,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,SAAS,CAAC,WAAmB;IAC3C,OAAO;QACL,IAAI,IAAI,CAAC,kBAAkB,KAAK,IAAI,CAAC,WAAW,EAAE,EAAE,CAAC;YACnD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,IAAI,IAAI,CAAC,UAAU,KAAK,WAAW,IAAI,CAAC,IAAI,CAAC,YAAY,EAAE,CAAC;YAC1D,OAAO,IAAI,CAAC;QACd,CAAC;QAED,OAAO,IAAI,CAAC,YAAY,KAAK,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;IACvD,CAAC,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,SAAgB,oBAAoB,CAAC,KAAa,EAAE,SAAiB;IACnE,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,EAAE,GAAG,CAAC,CAAC;IAE1D,IAAI,MAAM,CAAC,MAAM,GAAG,SAAS,EAAE,CAAC;QAC9B,MAAM,IAAI,4BAAY,CAAC,sBAAsB,CAAC,CAAC;IACjD,CAAC;IAED,MAAM,SAAS,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAEtC,IAAI,SAAS,KAAK,CAAC,CAAC,EAAE,CAAC;QACrB,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,CAAC;QAC1C,MAAM,IAAI,4BAAY,CAAC,sBAAsB,CAAC,CAAC;IACjD,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,iBAAiB,CAAC,MAAc;IAC9C,OAAO,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;AAC9C,CAAC;AAED,SAAgB,iBAAiB,CAAC,YAAoB;IACpD,OAAO,iBAAiB,CAAC,QAAQ,CAAC,YAAY,EAAE,EAAE,CAAC,CAAC,CAAC;AACvD,CAAC;AAED;;;GAGG;AACH,SAAgB,OAAO,CAAC,WAAmB,EAAE,QAAgB;IAC3D,MAAM,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAE/B,IAAI,QAAQ,GAAG,MAAM,EAAE,CAAC;QACtB,OAAO,KAAK,CAAC;IACf,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,GAAG,QAAQ,CAAC;IAC3C,OAAO,WAAW,CAAC,SAAS,CAAC,gBAAgB,EAAE,gBAAgB,GAAG,CAAC,CAAC,KAAK,GAAG,CAAC;AAC/E,CAAC","sourcesContent":["import { Address4 } from './ipv4';\nimport { Address6 } from './ipv6';\nimport { AddressError } from './address-error';\n\nexport interface ReverseFormOptions {\n omitSuffix?: boolean;\n}\n\nexport function isInSubnet(this: Address4 | Address6, address: Address4 | Address6) {\n if (this.subnetMask < address.subnetMask) {\n return false;\n }\n\n if (this.mask(address.subnetMask) === address.mask()) {\n return true;\n }\n\n return false;\n}\n\nexport function isCorrect(defaultBits: number) {\n return function (this: Address4 | Address6) {\n if (this.addressMinusSuffix !== this.correctForm()) {\n return false;\n }\n\n if (this.subnetMask === defaultBits && !this.parsedSubnet) {\n return true;\n }\n\n return this.parsedSubnet === String(this.subnetMask);\n };\n}\n\n/**\n * Returns the prefix length (number of leading 1 bits) of a contiguous\n * subnet mask. Throws `AddressError` if the mask is non-contiguous (e.g.\n * `255.0.255.0`).\n */\nexport function prefixLengthFromMask(value: bigint, totalBits: number): number {\n const binary = value.toString(2).padStart(totalBits, '0');\n\n if (binary.length > totalBits) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n const firstZero = binary.indexOf('0');\n\n if (firstZero === -1) {\n return totalBits;\n }\n\n if (binary.slice(firstZero).includes('1')) {\n throw new AddressError('Invalid subnet mask.');\n }\n\n return firstZero;\n}\n\nexport function numberToPaddedHex(number: number) {\n return number.toString(16).padStart(2, '0');\n}\n\nexport function stringToPaddedHex(numberString: string) {\n return numberToPaddedHex(parseInt(numberString, 10));\n}\n\n/**\n * @param binaryValue Binary representation of a value (e.g. `10`)\n * @param position Byte position, where 0 is the least significant bit\n */\nexport function testBit(binaryValue: string, position: number): boolean {\n const { length } = binaryValue;\n\n if (position > length) {\n return false;\n }\n\n const positionInString = length - position;\n return binaryValue.substring(positionInString, positionInString + 1) === '1';\n}\n"]}
@@ -1,7 +0,0 @@
1
- export { Address4 } from './ipv4';
2
- export { Address6 } from './ipv6';
3
- export { AddressError } from './address-error';
4
- import * as helpers from './v6/helpers';
5
- export declare const v6: {
6
- helpers: typeof helpers;
7
- };
@@ -1,35 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.v6 = exports.AddressError = exports.Address6 = exports.Address4 = void 0;
27
- var ipv4_1 = require("./ipv4");
28
- Object.defineProperty(exports, "Address4", { enumerable: true, get: function () { return ipv4_1.Address4; } });
29
- var ipv6_1 = require("./ipv6");
30
- Object.defineProperty(exports, "Address6", { enumerable: true, get: function () { return ipv6_1.Address6; } });
31
- var address_error_1 = require("./address-error");
32
- Object.defineProperty(exports, "AddressError", { enumerable: true, get: function () { return address_error_1.AddressError; } });
33
- const helpers = __importStar(require("./v6/helpers"));
34
- exports.v6 = { helpers };
35
- //# sourceMappingURL=ip-address.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ip-address.js","sourceRoot":"","sources":["../src/ip-address.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AACjB,+BAAkC;AAAzB,gGAAA,QAAQ,OAAA;AACjB,iDAA+C;AAAtC,6GAAA,YAAY,OAAA;AAErB,sDAAwC;AAE3B,QAAA,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC","sourcesContent":["export { Address4 } from './ipv4';\nexport { Address6 } from './ipv6';\nexport { AddressError } from './address-error';\n\nimport * as helpers from './v6/helpers';\n\nexport const v6 = { helpers };\n"]}