```js const PeerId = require('peer-id') const peerId1 = PeerId.createFromB58String('QmZjTnYw2TFhn9Nn7tjmPSoTBoY7YRkwPzwSrSbabY24Kp') const peerId2 = PeerId.createFromB58String('QmZjTnYw2TFhn9Nn7tjmPSoTBoY7YRkwPzwSrSbabY24Kp') assert.deepEqual(peerId1, peerId2) // 'bafzbeifjjcie6lypi6ny7amxnfftagclbuxndqonfipmb64f2km2devei4' peerId1.toString() assert.deepEqual(peerId1, peerId2) // Uncaught AssertionError [ERR_ASSERTION]: Expected values to be loosely deep-equal: ``` This is because `.toString()` has the side effect of [setting](https://github.com/libp2p/js-peer-id/blob/master/src/index.js#L140) a `._idCIDString` property on `this` which the other peer ID doesn't have.