finds.dev← search

// the find

beaugunderson/ip-address

★ 611 · TypeScript · MIT · updated Jun 2026

💻 a library for parsing and manipulating IPv4 and IPv6 addresses in JavaScript

A TypeScript library for parsing, validating, and manipulating IPv4 and IPv6 addresses, including subnet math, special-range detection, and tunneling protocol decoding. Zero dependencies, runs in Node and the browser. It's a deep implementation — not just validation, but full Teredo/6to4 decoding, NAT64 encoding/decoding, arpa form, BigInt conversions, and RFC-compliant correct/canonical forms.

Full IPv6 coverage that most alternatives skip — Teredo, 6to4, NAT64, v4-in-v6, zone identifiers, and ULA detection are all there and RFC-cited. The isValid/constructor split is clean: isValid never throws, constructor throws AddressError with a parseMessage — makes validation vs. parsing ergonomically distinct. BigInt-native throughout, so 128-bit IPv6 arithmetic doesn't lose precision. Test suite is substantial, including external data files of valid/invalid addresses from real-world sources like IntermMapper.

No prefix aggregation or supernet computation — if you need to merge a list of CIDRs you're on your own. The fromURL return type is a tagged union without a discriminant, so callers have to check for error being undefined rather than a proper result/error type; awkward in TypeScript. The is4() vs isMapped4() distinction (notation vs. bits) will trip someone up — the distinction is documented but the names are too similar. 611 stars for 66M weekly downloads signals this is purely a transitive dependency for most of the ecosystem, not a library people consciously choose — which means maintenance pressure is low and issues may go stale.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →