Provides strategies ensure arrays are equivalent.
import { arrayEquals } from '@libp2p/utils/array-equals'import { multiaddr } from '@multformats/multiaddr'const ma1 = multiaddr('/ip4/127.0.0.1/tcp/9000'),const ma2 = multiaddr('/ip4/82.41.53.1/tcp/9000')console.info(arrayEquals([ma1], [ma1])) // trueconsole.info(arrayEquals([ma1], [ma2])) // false Copy
import { arrayEquals } from '@libp2p/utils/array-equals'import { multiaddr } from '@multformats/multiaddr'const ma1 = multiaddr('/ip4/127.0.0.1/tcp/9000'),const ma2 = multiaddr('/ip4/82.41.53.1/tcp/9000')console.info(arrayEquals([ma1], [ma1])) // trueconsole.info(arrayEquals([ma1], [ma2])) // false
Provides strategies ensure arrays are equivalent.
Example