JavaScript IPv4 & IPv6 prefix lengths calculator