asab_webui_components 27.3.6 → 27.3.7
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.
|
@@ -463,7 +463,19 @@ var stringifyIPv6 = bigintIP6Address => {
|
|
|
463
463
|
}
|
|
464
464
|
|
|
465
465
|
// Join the parts with colons to form the final compressed IPv6 address.
|
|
466
|
-
|
|
466
|
+
var result = parts.join(':');
|
|
467
|
+
// All-zero address compresses to a single empty segment ""; canonical form is "::"
|
|
468
|
+
if (result === '') {
|
|
469
|
+
return '::';
|
|
470
|
+
}
|
|
471
|
+
// Boundary compression: empty segment at start/end produces ":1" or "1:" instead of "::1" or "1::"
|
|
472
|
+
if (result.startsWith(':') && !result.startsWith('::')) {
|
|
473
|
+
result = ':' + result;
|
|
474
|
+
}
|
|
475
|
+
if (result.endsWith(':') && !result.endsWith('::')) {
|
|
476
|
+
result = result + ':';
|
|
477
|
+
}
|
|
478
|
+
return result;
|
|
467
479
|
};
|
|
468
480
|
var stringifyIPv4 = bigintIP4Address => {
|
|
469
481
|
var parts = [];
|