sortIpAddressList()
Microsoft IPv6 extension. Sorts a semicolon-separated IP address list.
sortIpAddressList(list) → stringOnly in engines that bind it natively (see the availability table).
Example
var sorted = sortIpAddressList(dnsResolveEx(host));
Engine notes
| Engine | Behaviour | Source |
|---|---|---|
| winhttp | Returns the list separated by ";" with IPv6 addresses in brackets, in an order of its own: "10.1.1.1;fd00::1;192.168.1.1;::1;127.0.0.1" came back as "[::1];10.1.1.1;192.168.1.1;127.0.0.1;[fd00::1]". Spaces after ";" are accepted. An entry that is not an address, or an empty string, gives false. | lab, verified 2026-10-11 |
Availability
| Function | chromium | chromium | firefox | pacparser | pacparser | winhttp | wininet | reference |
|---|---|---|---|---|---|---|---|---|
sortIpAddressList | yes | yes | no | no | no | yes | yes | no |