(address)
| 3833 | return address; |
| 3834 | } |
| 3835 | function serializeIPv6(address) { |
| 3836 | let output = ""; |
| 3837 | const compress = findTheIPv6AddressCompressedPieceIndex(address); |
| 3838 | let ignore0 = false; |
| 3839 | for (let pieceIndex = 0; pieceIndex <= 7; ++pieceIndex) { |
| 3840 | if (ignore0 && address[pieceIndex] === 0) { |
| 3841 | continue; |
| 3842 | } else if (ignore0) { |
| 3843 | ignore0 = false; |
| 3844 | } |
| 3845 | if (compress === pieceIndex) { |
| 3846 | const separator = pieceIndex === 0 ? "::" : ":"; |
| 3847 | output += separator; |
| 3848 | ignore0 = true; |
| 3849 | continue; |
| 3850 | } |
| 3851 | output += address[pieceIndex].toString(16); |
| 3852 | if (pieceIndex !== 7) { |
| 3853 | output += ":"; |
| 3854 | } |
| 3855 | } |
| 3856 | return output; |
| 3857 | } |
| 3858 | function parseHost(input, isOpaque = false) { |
| 3859 | if (input[0] === "[") { |
| 3860 | if (input[input.length - 1] !== "]") { |
no test coverage detected
searching dependent graphs…