0.0.0 • Published 2 years ago
@libp2p/peer-list v0.0.0
libp2p-peer-list
a list of peer ids
Table of Contents
Description
A list of peerIDs with the methods you'd expect from a list.
PeerIds cache stringified versions of themselves so this should be a cheap operation.
Example
import { peerList } from '@libp2p/peer-list'
import { peerIdFromString } from '@libp2p/peer-id'
const list = peerList()
list.add(peerId)
list.has(peerId) // true
list.has(peerIdFromString(peerId.toString())) // true
Installation
$ npm i @libp2p/peer-list
License
Licensed under either of
- Apache 2.0, (LICENSE-APACHE / http://www.apache.org/licenses/LICENSE-2.0)
- MIT (LICENSE-MIT / http://opensource.org/licenses/MIT)
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.
0.0.0
2 years ago