@multiformats/multiaddr-matcher
    Preparing search index...

    Variable IP_OR_DOMAINConst

    IP_OR_DOMAIN: MultiaddrMatcher = ...

    A matcher for addresses that start with IP or DNS tuples.

    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