This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Abbreviate full ipv6 address | |
* By Brent Stees (http://facebook.com/brent.stees), 2014 | |
* MIT Licenced, see http://www.opensource.org/licenses/mit-license.php */ | |
function abbreviate_ipv6(ip){ | |
if(ip.indexOf("::") == -1) { | |
// needs to be abbreviated | |
// remove leading zeros |