Matches ip4 or ip6 addresses.

Example

import { multiaddr } from '@multiformats/multiaddr'
import { IP } from '@multiformats/multiaddr-matcher'

IP.matches(multiaddr('/ip4/123.123.123.123')) // true
IP.matches(multiaddr('/ip6/fe80::1cc1:a3b8:322f:cf22')) // true