@leofcoin/peernet 0.11.11 → 0.11.12

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.
@@ -84645,7 +84645,6 @@ class Peernet {
84645
84645
  * @type {Map}
84646
84646
  * @property {Object} peer Instance of Peer
84647
84647
  */
84648
- this.peerMap = new Map()
84649
84648
  this.stores = []
84650
84649
  this.requestProtos = {}
84651
84650
  this.storePrefix = options.storePrefix
@@ -84745,14 +84744,6 @@ class Peernet {
84745
84744
  return this
84746
84745
  }
84747
84746
 
84748
- _getPeerId(id) {
84749
- for (const entry of [...this.peerMap.entries()]) {
84750
- for (const _id of entry[1]) {
84751
- if (_id === id) return entry[0]
84752
- }
84753
- }
84754
- }
84755
-
84756
84747
  addRequestHandler(name, method) {
84757
84748
  this.requestProtos[name] = method
84758
84749
  }
@@ -10,7 +10,7 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
10
10
  var PubSub__default = /*#__PURE__*/_interopDefaultLegacy(PubSub);
11
11
  var Koa__default = /*#__PURE__*/_interopDefaultLegacy(Koa);
12
12
 
13
- var version = "0.11.10";
13
+ var version = "0.11.11";
14
14
 
15
15
  var api$1 = {
16
16
  version: ({send}) => send({client: '@peernet/api/http', version}),
@@ -1591,7 +1591,6 @@ class Peernet {
1591
1591
  * @type {Map}
1592
1592
  * @property {Object} peer Instance of Peer
1593
1593
  */
1594
- this.peerMap = new Map();
1595
1594
  this.stores = [];
1596
1595
  this.requestProtos = {};
1597
1596
  this.storePrefix = options.storePrefix;
@@ -1634,7 +1633,7 @@ class Peernet {
1634
1633
  protocol: 'peernet-v0.1.0', host: '127.0.0.1', port: options.port
1635
1634
  });
1636
1635
  } else {
1637
- const http = await Promise.resolve().then(function () { return require('./http-1de9e08b.js'); });
1636
+ const http = await Promise.resolve().then(function () { return require('./http-dc146709.js'); });
1638
1637
  if (environment !== 'browser') http.default(options);
1639
1638
  }
1640
1639
 
@@ -1698,14 +1697,6 @@ class Peernet {
1698
1697
  return this
1699
1698
  }
1700
1699
 
1701
- _getPeerId(id) {
1702
- for (const entry of [...this.peerMap.entries()]) {
1703
- for (const _id of entry[1]) {
1704
- if (_id === id) return entry[0]
1705
- }
1706
- }
1707
- }
1708
-
1709
1700
  addRequestHandler(name, method) {
1710
1701
  this.requestProtos[name] = method;
1711
1702
  }
@@ -2188,7 +2188,6 @@ class Peernet {
2188
2188
  * @type {Map}
2189
2189
  * @property {Object} peer Instance of Peer
2190
2190
  */
2191
- this.peerMap = new Map();
2192
2191
  this.stores = [];
2193
2192
  this.requestProtos = {};
2194
2193
  this.storePrefix = options.storePrefix;
@@ -2287,14 +2286,6 @@ class Peernet {
2287
2286
  return this
2288
2287
  }
2289
2288
 
2290
- _getPeerId(id) {
2291
- for (const entry of [...this.peerMap.entries()]) {
2292
- for (const _id of entry[1]) {
2293
- if (_id === id) return entry[0]
2294
- }
2295
- }
2296
- }
2297
-
2298
2289
  addRequestHandler(name, method) {
2299
2290
  this.requestProtos[name] = method;
2300
2291
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.11.11",
3
+ "version": "0.11.12",
4
4
  "description": "",
5
5
  "main": "dist/commonjs/peernet.js",
6
6
  "module": "dist/module/peernet.js",
package/src/peernet.js CHANGED
@@ -139,7 +139,6 @@ export default class Peernet {
139
139
  * @type {Map}
140
140
  * @property {Object} peer Instance of Peer
141
141
  */
142
- this.peerMap = new Map()
143
142
  this.stores = []
144
143
  this.requestProtos = {}
145
144
  this.storePrefix = options.storePrefix
@@ -239,14 +238,6 @@ export default class Peernet {
239
238
  return this
240
239
  }
241
240
 
242
- _getPeerId(id) {
243
- for (const entry of [...this.peerMap.entries()]) {
244
- for (const _id of entry[1]) {
245
- if (_id === id) return entry[0]
246
- }
247
- }
248
- }
249
-
250
241
  addRequestHandler(name, method) {
251
242
  this.requestProtos[name] = method
252
243
  }