pnpm 10.33.1 → 10.33.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/node_modules/.modules.yaml +74 -74
  2. package/dist/node_modules/.pnpm/lock.yaml +8 -8
  3. package/dist/node_modules/.pnpm-workspace-state-v1.json +1 -1
  4. package/dist/node_modules/ip-address/dist/address-error.js.map +1 -1
  5. package/dist/node_modules/ip-address/dist/common.js +21 -0
  6. package/dist/node_modules/ip-address/dist/common.js.map +1 -1
  7. package/dist/node_modules/ip-address/dist/ip-address.js.map +1 -1
  8. package/dist/node_modules/ip-address/dist/ipv4.js +193 -68
  9. package/dist/node_modules/ip-address/dist/ipv4.js.map +1 -1
  10. package/dist/node_modules/ip-address/dist/ipv6.js +345 -131
  11. package/dist/node_modules/ip-address/dist/ipv6.js.map +1 -1
  12. package/dist/node_modules/ip-address/dist/v4/constants.js.map +1 -1
  13. package/dist/node_modules/ip-address/dist/v6/constants.js +5 -0
  14. package/dist/node_modules/ip-address/dist/v6/constants.js.map +1 -1
  15. package/dist/node_modules/ip-address/dist/v6/helpers.js +12 -3
  16. package/dist/node_modules/ip-address/dist/v6/helpers.js.map +1 -1
  17. package/dist/node_modules/ip-address/dist/v6/regular-expressions.js.map +1 -1
  18. package/dist/node_modules/ip-address/package.json +45 -35
  19. package/dist/node_modules/socks/.claude/settings.local.json +26 -0
  20. package/dist/node_modules/socks/package.json +2 -2
  21. package/dist/pnpm.cjs +73 -10
  22. package/package.json +1 -1
  23. package/dist/node_modules/ip-address/dist/address-error.d.ts.map +0 -1
  24. package/dist/node_modules/ip-address/dist/common.d.ts.map +0 -1
  25. package/dist/node_modules/ip-address/dist/ip-address.d.ts.map +0 -1
  26. package/dist/node_modules/ip-address/dist/ipv4.d.ts.map +0 -1
  27. package/dist/node_modules/ip-address/dist/ipv6.d.ts.map +0 -1
  28. package/dist/node_modules/ip-address/dist/v4/constants.d.ts.map +0 -1
  29. package/dist/node_modules/ip-address/dist/v6/constants.d.ts.map +0 -1
  30. package/dist/node_modules/ip-address/dist/v6/helpers.d.ts.map +0 -1
  31. package/dist/node_modules/ip-address/dist/v6/regular-expressions.d.ts.map +0 -1
@@ -25,18 +25,18 @@
25
25
  "env-paths@2.2.1": [
26
26
  "node_modules/env-paths"
27
27
  ],
28
- "proc-log@5.0.0": [
29
- "node_modules/proc-log"
30
- ],
31
28
  "tinyglobby@0.2.16": [
32
29
  "node_modules/tinyglobby"
33
30
  ],
34
- "exponential-backoff@3.1.3": [
35
- "node_modules/exponential-backoff"
31
+ "proc-log@5.0.0": [
32
+ "node_modules/proc-log"
36
33
  ],
37
34
  "which@5.0.0": [
38
35
  "node_modules/which"
39
36
  ],
37
+ "exponential-backoff@3.1.3": [
38
+ "node_modules/exponential-backoff"
39
+ ],
40
40
  "graceful-fs@4.2.11": [
41
41
  "node_modules/graceful-fs"
42
42
  ],
@@ -49,33 +49,42 @@
49
49
  "abbrev@3.0.1": [
50
50
  "node_modules/abbrev"
51
51
  ],
52
+ "yallist@5.0.0": [
53
+ "node_modules/yallist"
54
+ ],
52
55
  "@isaacs/fs-minipass@4.0.1": [
53
56
  "node_modules/@isaacs/fs-minipass"
54
57
  ],
55
58
  "chownr@3.0.0": [
56
59
  "node_modules/chownr"
57
60
  ],
58
- "yallist@5.0.0": [
59
- "node_modules/yallist"
60
- ],
61
61
  "minizlib@3.1.0": [
62
62
  "node_modules/minizlib"
63
63
  ],
64
64
  "minipass@7.1.3": [
65
65
  "node_modules/minipass"
66
66
  ],
67
- "picomatch@4.0.4": [
68
- "node_modules/picomatch"
69
- ],
70
67
  "fdir@6.5.0(picomatch@4.0.4)": [
71
68
  "node_modules/fdir"
72
69
  ],
70
+ "picomatch@4.0.4": [
71
+ "node_modules/picomatch"
72
+ ],
73
73
  "isexe@3.1.1": [
74
74
  "node_modules/isexe"
75
75
  ],
76
+ "promise-retry@2.0.1": [
77
+ "node_modules/promise-retry"
78
+ ],
79
+ "negotiator@1.0.0": [
80
+ "node_modules/negotiator"
81
+ ],
76
82
  "ssri@12.0.0": [
77
83
  "node_modules/ssri"
78
84
  ],
85
+ "minipass-fetch@4.0.1": [
86
+ "node_modules/minipass-fetch"
87
+ ],
79
88
  "minipass@3.3.6": [
80
89
  "node_modules/minipass-flush/node_modules/minipass",
81
90
  "node_modules/minipass-pipeline/node_modules/minipass",
@@ -86,29 +95,23 @@
86
95
  "node_modules/minipass-pipeline/node_modules/yallist",
87
96
  "node_modules/minipass-sized/node_modules/yallist"
88
97
  ],
89
- "promise-retry@2.0.1": [
90
- "node_modules/promise-retry"
91
- ],
92
98
  "@npmcli/agent@3.0.0": [
93
99
  "node_modules/@npmcli/agent"
94
100
  ],
95
- "negotiator@1.0.0": [
96
- "node_modules/negotiator"
97
- ],
98
- "minipass-fetch@4.0.1": [
99
- "node_modules/minipass-fetch"
100
- ],
101
101
  "cacache@19.0.1": [
102
102
  "node_modules/cacache"
103
103
  ],
104
104
  "http-cache-semantics@4.2.0": [
105
105
  "node_modules/http-cache-semantics"
106
106
  ],
107
+ "retry@0.12.0": [
108
+ "node_modules/retry"
109
+ ],
107
110
  "err-code@2.0.3": [
108
111
  "node_modules/err-code"
109
112
  ],
110
- "retry@0.12.0": [
111
- "node_modules/retry"
113
+ "encoding@0.1.13": [
114
+ "node_modules/encoding"
112
115
  ],
113
116
  "agent-base@7.1.4": [
114
117
  "node_modules/agent-base"
@@ -125,8 +128,8 @@
125
128
  "lru-cache@10.4.3": [
126
129
  "node_modules/lru-cache"
127
130
  ],
128
- "encoding@0.1.13": [
129
- "node_modules/encoding"
131
+ "unique-filename@4.0.0": [
132
+ "node_modules/unique-filename"
130
133
  ],
131
134
  "minipass-collect@2.0.1": [
132
135
  "node_modules/minipass-collect"
@@ -134,56 +137,56 @@
134
137
  "fs-minipass@3.0.3": [
135
138
  "node_modules/fs-minipass"
136
139
  ],
137
- "@npmcli/fs@4.0.0": [
138
- "node_modules/@npmcli/fs"
139
- ],
140
140
  "p-map@7.0.4": [
141
141
  "node_modules/p-map"
142
142
  ],
143
+ "@npmcli/fs@4.0.0": [
144
+ "node_modules/@npmcli/fs"
145
+ ],
143
146
  "glob@10.5.0": [
144
147
  "node_modules/glob"
145
148
  ],
146
- "unique-filename@4.0.0": [
147
- "node_modules/unique-filename"
149
+ "iconv-lite@0.6.3": [
150
+ "node_modules/iconv-lite"
148
151
  ],
149
152
  "debug@4.4.3": [
150
153
  "node_modules/debug"
151
154
  ],
152
- "socks@2.8.7": [
155
+ "socks@2.8.8": [
153
156
  "node_modules/socks"
154
157
  ],
155
- "iconv-lite@0.6.3": [
156
- "node_modules/iconv-lite"
157
- ],
158
- "package-json-from-dist@1.0.1": [
159
- "node_modules/package-json-from-dist"
158
+ "unique-slug@5.0.0": [
159
+ "node_modules/unique-slug"
160
160
  ],
161
161
  "foreground-child@3.3.1": [
162
162
  "node_modules/foreground-child"
163
163
  ],
164
- "jackspeak@3.4.3": [
165
- "node_modules/jackspeak"
164
+ "package-json-from-dist@1.0.1": [
165
+ "node_modules/package-json-from-dist"
166
166
  ],
167
167
  "path-scurry@1.11.1": [
168
168
  "node_modules/path-scurry"
169
169
  ],
170
+ "jackspeak@3.4.3": [
171
+ "node_modules/jackspeak"
172
+ ],
170
173
  "minimatch@9.0.9": [
171
174
  "node_modules/minimatch"
172
175
  ],
173
- "unique-slug@5.0.0": [
174
- "node_modules/unique-slug"
176
+ "safer-buffer@2.1.2": [
177
+ "node_modules/safer-buffer"
175
178
  ],
176
179
  "ms@2.1.3": [
177
180
  "node_modules/ms"
178
181
  ],
179
- "ip-address@10.1.0": [
180
- "node_modules/ip-address"
181
- ],
182
182
  "smart-buffer@4.2.0": [
183
183
  "node_modules/smart-buffer"
184
184
  ],
185
- "safer-buffer@2.1.2": [
186
- "node_modules/safer-buffer"
185
+ "ip-address@10.2.0": [
186
+ "node_modules/ip-address"
187
+ ],
188
+ "imurmurhash@0.1.4": [
189
+ "node_modules/imurmurhash"
187
190
  ],
188
191
  "signal-exit@4.1.0": [
189
192
  "node_modules/signal-exit"
@@ -203,38 +206,28 @@
203
206
  "brace-expansion@2.1.0": [
204
207
  "node_modules/brace-expansion"
205
208
  ],
206
- "imurmurhash@0.1.4": [
207
- "node_modules/imurmurhash"
208
- ],
209
209
  "shebang-command@2.0.0": [
210
210
  "node_modules/shebang-command"
211
211
  ],
212
212
  "path-key@3.1.1": [
213
213
  "node_modules/path-key"
214
214
  ],
215
- "string-width@5.1.2": [
216
- "node_modules/string-width"
217
- ],
218
- "strip-ansi@6.0.1": [
219
- "node_modules/string-width-cjs/node_modules/strip-ansi",
220
- "node_modules/wrap-ansi-cjs/node_modules/strip-ansi",
221
- "node_modules/strip-ansi-cjs"
222
- ],
223
- "emoji-regex@8.0.0": [
224
- "node_modules/string-width-cjs/node_modules/emoji-regex",
225
- "node_modules/wrap-ansi-cjs/node_modules/emoji-regex"
215
+ "strip-ansi@7.2.0": [
216
+ "node_modules/strip-ansi"
226
217
  ],
227
218
  "ansi-regex@5.0.1": [
228
- "node_modules/string-width-cjs/node_modules/ansi-regex",
229
219
  "node_modules/strip-ansi-cjs/node_modules/ansi-regex",
230
- "node_modules/wrap-ansi-cjs/node_modules/ansi-regex"
231
- ],
232
- "strip-ansi@7.2.0": [
233
- "node_modules/strip-ansi"
220
+ "node_modules/wrap-ansi-cjs/node_modules/ansi-regex",
221
+ "node_modules/string-width-cjs/node_modules/ansi-regex"
234
222
  ],
235
223
  "wrap-ansi@8.1.0": [
236
224
  "node_modules/wrap-ansi"
237
225
  ],
226
+ "strip-ansi@6.0.1": [
227
+ "node_modules/wrap-ansi-cjs/node_modules/strip-ansi",
228
+ "node_modules/string-width-cjs/node_modules/strip-ansi",
229
+ "node_modules/strip-ansi-cjs"
230
+ ],
238
231
  "string-width@4.2.3": [
239
232
  "node_modules/wrap-ansi-cjs/node_modules/string-width",
240
233
  "node_modules/string-width-cjs"
@@ -242,30 +235,37 @@
242
235
  "ansi-styles@4.3.0": [
243
236
  "node_modules/wrap-ansi-cjs/node_modules/ansi-styles"
244
237
  ],
238
+ "emoji-regex@8.0.0": [
239
+ "node_modules/wrap-ansi-cjs/node_modules/emoji-regex",
240
+ "node_modules/string-width-cjs/node_modules/emoji-regex"
241
+ ],
242
+ "string-width@5.1.2": [
243
+ "node_modules/string-width"
244
+ ],
245
245
  "balanced-match@1.0.2": [
246
246
  "node_modules/balanced-match"
247
247
  ],
248
248
  "shebang-regex@3.0.0": [
249
249
  "node_modules/shebang-regex"
250
250
  ],
251
- "eastasianwidth@0.2.0": [
252
- "node_modules/eastasianwidth"
253
- ],
254
- "emoji-regex@9.2.2": [
255
- "node_modules/emoji-regex"
256
- ],
257
- "is-fullwidth-code-point@3.0.0": [
258
- "node_modules/is-fullwidth-code-point"
259
- ],
260
251
  "ansi-regex@6.2.2": [
261
252
  "node_modules/ansi-regex"
262
253
  ],
263
254
  "ansi-styles@6.2.3": [
264
255
  "node_modules/ansi-styles"
265
256
  ],
257
+ "is-fullwidth-code-point@3.0.0": [
258
+ "node_modules/is-fullwidth-code-point"
259
+ ],
266
260
  "color-convert@2.0.1": [
267
261
  "node_modules/color-convert"
268
262
  ],
263
+ "eastasianwidth@0.2.0": [
264
+ "node_modules/eastasianwidth"
265
+ ],
266
+ "emoji-regex@9.2.2": [
267
+ "node_modules/emoji-regex"
268
+ ],
269
269
  "color-name@1.1.4": [
270
270
  "node_modules/color-name"
271
271
  ],
@@ -286,10 +286,10 @@
286
286
  ]
287
287
  },
288
288
  "nodeLinker": "hoisted",
289
- "packageManager": "pnpm@10.33.0",
289
+ "packageManager": "pnpm@10.33.1",
290
290
  "pendingBuilds": [],
291
291
  "publicHoistPattern": [],
292
- "prunedAt": "Wed, 22 Apr 2026 09:31:19 GMT",
292
+ "prunedAt": "Mon, 04 May 2026 21:25:54 GMT",
293
293
  "registries": {
294
294
  "default": "https://registry.npmjs.org/",
295
295
  "@jsr": "https://npm.jsr.io/"
@@ -206,8 +206,8 @@ packages:
206
206
  resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==}
207
207
  engines: {node: '>=0.8.19'}
208
208
 
209
- ip-address@10.1.0:
210
- resolution: {integrity: sha512-XXADHxXmvT9+CRxhXg56LJovE+bmWnEWB78LB83VZTprKTmaC5QfruXocxzTZ2Kl0DNwKuBdlIhjL8LeY8Sf8Q==}
209
+ ip-address@10.2.0:
210
+ resolution: {integrity: sha512-/+S6j4E9AHvW9SWMSEY9Xfy66O5PWvVEJ08O0y5JGyEKQpojb0K0GKpz/v5HJ/G0vi3D2sjGK78119oXZeE0qA==}
211
211
  engines: {node: '>= 12'}
212
212
 
213
213
  is-fullwidth-code-point@3.0.0:
@@ -343,8 +343,8 @@ packages:
343
343
  resolution: {integrity: sha512-HehCEsotFqbPW9sJ8WVYB6UbmIMv7kUUORIF2Nncq4VQvBfNBLibW9YZR5dlYCSUhwcD628pRllm7n+E+YTzJw==}
344
344
  engines: {node: '>= 14'}
345
345
 
346
- socks@2.8.7:
347
- resolution: {integrity: sha512-HLpt+uLy/pxB+bum/9DzAgiKS8CX1EvbWxI4zlmgGCExImLdiad2iCwXT5Z4c9c3Eq8rP2318mPW2c+QbtjK8A==}
346
+ socks@2.8.8:
347
+ resolution: {integrity: sha512-NlGELfPrgX2f1TAAcz0WawlLn+0r3FyhhCRpFFK2CemXenPYvzMWWZINv3eDNo9ucdwme7oCHRY0Jnbs4aIkog==}
348
348
  engines: {node: '>= 10.0.0', npm: '>= 3.0.0'}
349
349
 
350
350
  ssri@12.0.0:
@@ -593,7 +593,7 @@ snapshots:
593
593
  imurmurhash@0.1.4:
594
594
  optional: true
595
595
 
596
- ip-address@10.1.0:
596
+ ip-address@10.2.0:
597
597
  optional: true
598
598
 
599
599
  is-fullwidth-code-point@3.0.0:
@@ -760,14 +760,14 @@ snapshots:
760
760
  dependencies:
761
761
  agent-base: 7.1.4
762
762
  debug: 4.4.3
763
- socks: 2.8.7
763
+ socks: 2.8.8
764
764
  transitivePeerDependencies:
765
765
  - supports-color
766
766
  optional: true
767
767
 
768
- socks@2.8.7:
768
+ socks@2.8.8:
769
769
  dependencies:
770
- ip-address: 10.1.0
770
+ ip-address: 10.2.0
771
771
  smart-buffer: 4.2.0
772
772
  optional: true
773
773
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "lastValidatedTimestamp": 1776850279834,
2
+ "lastValidatedTimestamp": 1777929954849,
3
3
  "projects": {},
4
4
  "pnpmfiles": [],
5
5
  "settings": {
@@ -1 +1 @@
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"}
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"]}
@@ -2,9 +2,11 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isInSubnet = isInSubnet;
4
4
  exports.isCorrect = isCorrect;
5
+ exports.prefixLengthFromMask = prefixLengthFromMask;
5
6
  exports.numberToPaddedHex = numberToPaddedHex;
6
7
  exports.stringToPaddedHex = stringToPaddedHex;
7
8
  exports.testBit = testBit;
9
+ const address_error_1 = require("./address-error");
8
10
  function isInSubnet(address) {
9
11
  if (this.subnetMask < address.subnetMask) {
10
12
  return false;
@@ -25,6 +27,25 @@ function isCorrect(defaultBits) {
25
27
  return this.parsedSubnet === String(this.subnetMask);
26
28
  };
27
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
+ }
28
49
  function numberToPaddedHex(number) {
29
50
  return number.toString(16).padStart(2, '0');
30
51
  }
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../src/common.ts"],"names":[],"mappings":";;AAOA,gCAUC;AAED,8BAYC;AAED,8CAEC;AAED,8CAEC;AAMD,0BASC;AA/CD,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,E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C,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 +1 @@
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"}
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"]}