# @libp2p/peer-list

> Stores a list of PeerIds

Latest version **0.0.0** (published 2022-02-17) · Apache-2.0 OR MIT license · 0 weekly downloads

## Install

```sh
npm install @libp2p/peer-list
pnpm add @libp2p/peer-list
yarn add @libp2p/peer-list
bun add @libp2p/peer-list
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.0 |
| Published | 2022-02-17 |
| First published | 2022-02-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 OR MIT |
| TypeScript types | bundled |
| Module format | ESM |
| Node | >=16.0.0 |
| Dependencies | 1 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 74 |
| Maintainers | alanshaw, vascosantos, achingbrain, daviddias |
| Keywords | IPFS |

## Links

- npm: https://www.npmjs.com/package/@libp2p/peer-list
- Repository: https://github.com/libp2p/js-libp2p-interfaces
- Homepage: https://github.com/libp2p/js-libp2p-interfaces/tree/master/packages/libp2p-peer-list#readme
- Issues: https://github.com/libp2p/js-libp2p-interfaces/issues
- npm.io page: https://npm.io/package/@libp2p/peer-list

## Dependencies (1)

- [@libp2p/interfaces](https://npm.io/package/@libp2p/interfaces.md) ^1.0.0

## Recent versions

- 0.0.0 (latest) — 2022-02-17

## README

# libp2p-peer-list <!-- omit in toc -->

> a list of peer ids

## Table of Contents <!-- omit in toc -->

- [Description](#description)
- [Example](#example)
- [Installation](#installation)
- [License](#license)
  - [Contribution](#contribution)

## 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

```JavaScript
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

```console
$ npm i @libp2p/peer-list
```

## License

Licensed under either of

 * Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / http://www.apache.org/licenses/LICENSE-2.0)
 * MIT ([LICENSE-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.

---
_Source: https://npm.io/package/@libp2p/peer-list · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
