@leofcoin/peernet 0.11.12 → 0.11.13

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.
@@ -84626,6 +84626,13 @@ class Peernet {
84626
84626
  return Object.entries(this.client.connections)
84627
84627
  }
84628
84628
 
84629
+ /**
84630
+ * @return {String} id - peerId
84631
+ */
84632
+ getConnection(id) {
84633
+ return this.client.connections[id]
84634
+ }
84635
+
84629
84636
  /**
84630
84637
  * @private
84631
84638
  *
@@ -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.11";
13
+ var version = "0.11.12";
14
14
 
15
15
  var api$1 = {
16
16
  version: ({send}) => send({client: '@peernet/api/http', version}),
@@ -1572,6 +1572,13 @@ class Peernet {
1572
1572
  return Object.entries(this.client.connections)
1573
1573
  }
1574
1574
 
1575
+ /**
1576
+ * @return {String} id - peerId
1577
+ */
1578
+ getConnection(id) {
1579
+ return this.client.connections[id]
1580
+ }
1581
+
1575
1582
  /**
1576
1583
  * @private
1577
1584
  *
@@ -1633,7 +1640,7 @@ class Peernet {
1633
1640
  protocol: 'peernet-v0.1.0', host: '127.0.0.1', port: options.port
1634
1641
  });
1635
1642
  } else {
1636
- const http = await Promise.resolve().then(function () { return require('./http-dc146709.js'); });
1643
+ const http = await Promise.resolve().then(function () { return require('./http-2bb2eb4b.js'); });
1637
1644
  if (environment !== 'browser') http.default(options);
1638
1645
  }
1639
1646
 
@@ -2169,6 +2169,13 @@ class Peernet {
2169
2169
  return Object.entries(this.client.connections)
2170
2170
  }
2171
2171
 
2172
+ /**
2173
+ * @return {String} id - peerId
2174
+ */
2175
+ getConnection(id) {
2176
+ return this.client.connections[id]
2177
+ }
2178
+
2172
2179
  /**
2173
2180
  * @private
2174
2181
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.11.12",
3
+ "version": "0.11.13",
4
4
  "description": "",
5
5
  "main": "dist/commonjs/peernet.js",
6
6
  "module": "dist/module/peernet.js",
package/src/peernet.js CHANGED
@@ -120,6 +120,13 @@ export default class Peernet {
120
120
  return Object.entries(this.client.connections)
121
121
  }
122
122
 
123
+ /**
124
+ * @return {String} id - peerId
125
+ */
126
+ getConnection(id) {
127
+ return this.client.connections[id]
128
+ }
129
+
123
130
  /**
124
131
  * @private
125
132
  *