How sindresorhus/is-ip works
is-ip is a small IP-address validation library. A caller supplies a string to a family-specific check or the combined check; the implementation builds an exact-match IP regex and tests it with a timeout. ipVersion delegates to the IPv6 and IPv4 checks and returns the matching version, or undefined. The runtime relationships are shown from index.js; no additional runtime subsystem is evident in the supplied tree.
Main entry points: index.js isIPv4
Components 7
Connections 12
- Library caller → isIP: checks address
readme.md - Library caller → isIPv4: checks IPv4
readme.md - Library caller → isIPv6: checks IPv6
readme.md - Library caller → ipVersion: gets version
readme.md - isIP → ip-regex: builds pattern
index.js - isIP → super-regex: tests match
index.js - isIPv4 → ip-regex: builds pattern
index.js - isIPv4 → super-regex: tests match
index.js - isIPv6 → ip-regex: builds pattern
index.js - isIPv6 → super-regex: tests match
index.js - ipVersion → isIPv6: checks first
index.js - ipVersion → isIPv4: checks second
index.js