Installable via npm install --save peer-id
, it can also be used directly in the browser.
The source is available for download from GitHub. Alternatively, you can install using npm:
$ npm install --save peer-id
You can then require()
peer-id as normal:
const peerId = require('peer-id')
peer-id
should work in any ECMAScript 2018 environment out of the box.
Usage:
<script type="text/javascript" src="index.js"></script>
The portable versions of peer-id
, including index.js
and index.min.js
, are included in the /dist
folder. peer-id
can also be found on unpkg.com under
Checks the equality of this
peer against a given PeerId.
((Buffer | PeerId))
boolean
:
Checks the equality of this
peer against a given PeerId.
.equals
((Buffer | PeerId))
boolean
: