npm / ip-num
ip-num
What changed in ip-num 1, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-19.
7 breaking1 security10 new APIs and options2 behavior and defaults7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initip-num 127 changes
Breaking changes 7
Throws on non-positive input instead of misbehaving, with additional edge-case handling.
All four IPv4 entry points reject multi-digit octets starting with 0, preventing parser-differential SSRF and allow-list bypasses; a lone 0 remains valid.
The preinstall lifecycle script was removed, so installing ip-num no longer runs an install-time script on the consumer's machine.
Rejects IPv6 strings with multiple % separators instead of silently dropping the extra parts.
Removes a stale compiled module shipped in the npm package; users who deep-imported this undocumented path should switch to documented modules.
Removes a stale compiled module shipped in the npm package; users who deep-imported this undocumented path should switch to documented modules.
Rejects IPv6 CIDR notation without a prefix instead of misbehaving.
Security 1
Fixes ReDoS-prone regular expressions.
New APIs and options 10
Adds hasEmbeddedRP().
Adds parsing support for IPv4-mapped IPv6 strings such as ::ffff:192.168.1.1.
Adds support for IPv6 link-local addresses with zone IDs such as fe80::1%eth0.
Adds a module for classifying IPv6 addresses.
Adds an isDocumentation() check.
Adds isLinkLocal() and related checks on IPv4 for IPv4/IPv6 parity.
Adds isLoopback() and related checks on IPv4 for IPv4/IPv6 parity.
Adds isMulticast() for IPv4 and IPv6.
Adds isPrivate() for both IPv4 and IPv6 via AbstractIPNum.
Adds isUnspecified() and related checks on IPv4 for IPv4/IPv6 parity.
Behavior and default changes 2
Recognizes RFC 9637's 3fff::/20 documentation space alongside 2001:db8::/32.
Adds checks for broadcast addresses.
Fixes and other changes 7
Accepts and rejects the same strings as the IPv4 parser.
Computes the correct CIDR prefix instead of using the host-bit count, fixing incorrect results for multi-address blocks.
Now matches the full RFC 4193 unique local range fc00::/7, so fc00::/8 addresses are no longer misclassified as Global Unicast.
Returns [false, ...] for an invalid zone id instead of throwing.
Corrects asdot+ ASN formatting to divide by 65536 instead of 65535.
Handles invalid IPv6 mask strings gracefully.
Correctly detects addresses constructed via fromBigInt.