Provides strategies ensure arrays are equivalent.

Example

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])) // true
console.info(arrayEquals([ma1], [ma2])) // false

Index

Functions