A browser- and node-compatible library for parsing IPv6 addresses
var v6 = require'ipv6'v6;var address = '2001:0:ce49:7601:e866:efff:62c3:fffe';console.logaddressisValid; // Prints "true"var teredo = addressteredo;console.logteredoclient4; // Prints "18.104.22.168"
For a browser:
Simple IPv6 testThe canonical form of a::b is:
- Parsing of most IPv6 notations
- Parsing of IPv6 Addresses and Ports from URLs with
- Validity checking
- Decoding of the Teredo information in an address
- Whether one address is a valid subnet of another
- What special properties a given address has (multicast prefix, unique local address prefix, etc.)
- Number of subnets of a certain size in a given address
- Display methods
- Hex, binary, and decimal
- Canonical form
- Correct form
- IPv4-compatible (i.e.
- Works in node.js and the browser
- Unit tests with node.js and Mocha
procstreamsfor the CLI tool
- Base 64/85 encoding?
- Reverse lookups? (Whether a domain name has IPv6 glue)