Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
docs: fix jsdoc
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddias committed Mar 31, 2017
1 parent fe6f44e commit e1df873
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions src/index.js
Expand Up @@ -38,7 +38,7 @@ class PeerBook {
* Stores a peerInfo, if already exist, merges the new into the old.
*
* @param {PeerInfo} peerInfo
* @param {replace} boolean
* @param {Boolean} replace
* @returns {PeerInfo}
*/
put (peerInfo, replace) {
Expand Down Expand Up @@ -76,7 +76,7 @@ class PeerBook {
/**
* Get the info to the given PeerId, PeerInfo or b58Str id
*
* @param {PeerId} id
* @param {PeerId} peer
* @returns {PeerInfo}
*/
get (peer) {
Expand All @@ -98,15 +98,9 @@ class PeerBook {
return Object.keys(this._peers).map((b58Str) => this._peers[b58Str])
}

/**
* Return all multiaddrs for a given PeerId.
*
* @param {PeerId, PeerInfo, Multihash, B58Str} id
* @returns {Array<Multiaddr>}
*/
getMultiaddrs (peer) {
const info = this.get(peer)
return info.multiaddrs
return info.multiaddrs.toArray()
}

remove (peer) {
Expand Down

0 comments on commit e1df873

Please sign in to comment.