(address)
| 3899 | return utf8PercentEncodeString(input, isC0ControlPercentEncode); |
| 3900 | } |
| 3901 | function findTheIPv6AddressCompressedPieceIndex(address) { |
| 3902 | let longestIndex = null; |
| 3903 | let longestSize = 1; |
| 3904 | let foundIndex = null; |
| 3905 | let foundSize = 0; |
| 3906 | for (let pieceIndex = 0; pieceIndex < address.length; ++pieceIndex) { |
| 3907 | if (address[pieceIndex] !== 0) { |
| 3908 | if (foundSize > longestSize) { |
| 3909 | longestIndex = foundIndex; |
| 3910 | longestSize = foundSize; |
| 3911 | } |
| 3912 | foundIndex = null; |
| 3913 | foundSize = 0; |
| 3914 | } else { |
| 3915 | if (foundIndex === null) { |
| 3916 | foundIndex = pieceIndex; |
| 3917 | } |
| 3918 | ++foundSize; |
| 3919 | } |
| 3920 | } |
| 3921 | if (foundSize > longestSize) { |
| 3922 | return foundIndex; |
| 3923 | } |
| 3924 | return longestIndex; |
| 3925 | } |
| 3926 | function serializeHost(host) { |
| 3927 | if (typeof host === "number") { |
| 3928 | return serializeIPv4(host); |
no outgoing calls
no test coverage detected
searching dependent graphs…