@libp2p/peer-collections 4.0.5 → 4.0.6-69581367

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- # @libp2p/peer-collections <!-- omit in toc -->
2
-
3
1
  [![libp2p.io](https://img.shields.io/badge/project-libp2p-yellow.svg?style=flat-square)](http://libp2p.io/)
4
2
  [![Discuss](https://img.shields.io/discourse/https/discuss.libp2p.io/posts.svg?style=flat-square)](https://discuss.libp2p.io)
5
3
  [![codecov](https://img.shields.io/codecov/c/github/libp2p/js-libp2p.svg?style=flat-square)](https://codecov.io/gh/libp2p/js-libp2p)
@@ -7,22 +5,19 @@
7
5
 
8
6
  > Stores values against a peer id
9
7
 
10
- ## Table of contents <!-- omit in toc -->
8
+ # About
11
9
 
12
- - [Install](#install)
13
- - [Browser `<script>` tag](#browser-script-tag)
14
- - [Description](#description)
15
- - [API Docs](#api-docs)
16
- - [License](#license)
17
- - [Contribution](#contribution)
10
+ We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.
18
11
 
19
- ## Install
12
+ PeerIds cache stringified versions of themselves so this should be a cheap operation.
13
+
14
+ # Install
20
15
 
21
16
  ```console
22
17
  $ npm i @libp2p/peer-collections
23
18
  ```
24
19
 
25
- ### Browser `<script>` tag
20
+ ## Browser `<script>` tag
26
21
 
27
22
  Loading this module through a script tag will make it's exports available as `Libp2pPeerCollections` in the global namespace.
28
23
 
@@ -30,23 +25,17 @@ Loading this module through a script tag will make it's exports available as `Li
30
25
  <script src="https://unpkg.com/@libp2p/peer-collections/dist/index.min.js"></script>
31
26
  ```
32
27
 
33
- ## Description
34
-
35
- We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.
36
-
37
- PeerIds cache stringified versions of themselves so this should be a cheap operation.
38
-
39
- ## API Docs
28
+ # API Docs
40
29
 
41
30
  - <https://libp2p.github.io/js-libp2p/modules/_libp2p_peer_collections.html>
42
31
 
43
- ## License
32
+ # License
44
33
 
45
34
  Licensed under either of
46
35
 
47
36
  - Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
48
37
  - MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
49
38
 
50
- ## Contribution
39
+ # Contribution
51
40
 
52
41
  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.
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.
5
+ *
6
+ * PeerIds cache stringified versions of themselves so this should be a cheap operation.
7
+ */
1
8
  export { PeerMap } from './map.js';
2
9
  export { PeerSet } from './set.js';
3
10
  export { PeerList } from './list.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA"}
package/dist/src/index.js CHANGED
@@ -1,3 +1,10 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.
5
+ *
6
+ * PeerIds cache stringified versions of themselves so this should be a cheap operation.
7
+ */
1
8
  export { PeerMap } from './map.js';
2
9
  export { PeerSet } from './set.js';
3
10
  export { PeerList } from './list.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@libp2p/peer-collections",
3
- "version": "4.0.5",
3
+ "version": "4.0.6-69581367",
4
4
  "description": "Stores values against a peer id",
5
5
  "license": "Apache-2.0 OR MIT",
6
6
  "homepage": "https://github.com/libp2p/js-libp2p/tree/master/packages/peer-collections#readme",
@@ -49,11 +49,11 @@
49
49
  "test:electron-main": "aegir test -t electron-main"
50
50
  },
51
51
  "dependencies": {
52
- "@libp2p/interface": "^0.1.3",
53
- "@libp2p/peer-id": "^3.0.3"
52
+ "@libp2p/interface": "0.1.4-69581367",
53
+ "@libp2p/peer-id": "3.0.4-69581367"
54
54
  },
55
55
  "devDependencies": {
56
- "@libp2p/peer-id-factory": "^3.0.5",
56
+ "@libp2p/peer-id-factory": "3.0.6-69581367",
57
57
  "aegir": "^41.0.2"
58
58
  }
59
59
  }
package/src/index.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /**
2
+ * @packageDocumentation
3
+ *
4
+ * We can't use PeerIds as collection keys because collection keys are compared using same-value-zero equality, so this is just a group of collections that stringifies PeerIds before storing them.
5
+ *
6
+ * PeerIds cache stringified versions of themselves so this should be a cheap operation.
7
+ */
8
+
1
9
  export { PeerMap } from './map.js'
2
10
  export { PeerSet } from './set.js'
3
11
  export { PeerList } from './list.js'
@@ -1,5 +0,0 @@
1
- {
2
- "PeerList": "https://libp2p.github.io/js-libp2p/classes/_libp2p_peer_collections.PeerList.html",
3
- "PeerMap": "https://libp2p.github.io/js-libp2p/classes/_libp2p_peer_collections.PeerMap.html",
4
- "PeerSet": "https://libp2p.github.io/js-libp2p/classes/_libp2p_peer_collections.PeerSet.html"
5
- }