Const
import { multiaddr } from '@multiformats/multiaddr'
import { IP_OR_DOMAIN } from '@multiformats/multiaddr-matcher'
IP_OR_DOMAIN.matches(multiaddr('/ip4/123.123.123.123')) // true
IP_OR_DOMAIN.matches(multiaddr('/ip4/123.123.123.123/p2p/QmFoo')) // true
IP_OR_DOMAIN.matches(multiaddr('/dns/example.com/p2p/QmFoo')) // true
IP_OR_DOMAIN.matches(multiaddr('/p2p/QmFoo')) // false
A matcher for addresses that start with IP or DNS tuples.