Skip to content

Instantly share code, notes, and snippets.

@andretw
Created December 30, 2014 02:54
Show Gist options
  • Save andretw/90cb423c24b0e094676f to your computer and use it in GitHub Desktop.
Save andretw/90cb423c24b0e094676f to your computer and use it in GitHub Desktop.
Check if the IP is IPv6 or not. (Using uri.js)
isIpv6 = (ip) ->
uri = new URI("http://#{ip}")
result = uri.is("ipv6")
$log.debug "check ip #{ip} is ipv6 or not: #{result}"
return result
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment