@leofcoin/peernet 0.10.0 → 0.10.1

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.
@@ -35,13 +35,13 @@ class PeernetPeer {
35
35
  this._events = {};
36
36
  this.bw = {
37
37
  up: 0,
38
- down: 0
38
+ down: 0,
39
39
  };
40
40
  this.id = id;
41
41
  this.connection = connection;
42
42
 
43
43
  this.connection.on('data', (message) => {
44
- this.bw.down += data.length;
44
+ this.bw.down += message.length;
45
45
  pubsub.publish('peernet.data', JSON.parse(message.toString()));
46
46
  });
47
47
  }
@@ -289,7 +289,7 @@ class LeofcoinStorage$1 {
289
289
 
290
290
  }
291
291
 
292
- var version = "0.9.12";
292
+ var version = "0.10.0";
293
293
 
294
294
  var api$1 = {
295
295
  version: ({send}) => send({client: '@peernet/api/http', version}),
@@ -38,13 +38,13 @@ class PeernetPeer {
38
38
  this._events = {};
39
39
  this.bw = {
40
40
  up: 0,
41
- down: 0
41
+ down: 0,
42
42
  };
43
43
  this.id = id;
44
44
  this.connection = connection;
45
45
 
46
46
  this.connection.on('data', (message) => {
47
- this.bw.down += data.length;
47
+ this.bw.down += message.length;
48
48
  pubsub.publish('peernet.data', JSON.parse(message.toString()));
49
49
  });
50
50
  }
@@ -292,7 +292,7 @@ class LeofcoinStorage$1 {
292
292
 
293
293
  }
294
294
 
295
- var version = "0.9.12";
295
+ var version = "0.10.0";
296
296
 
297
297
  var api$1 = {
298
298
  version: ({send}) => send({client: '@peernet/api/http', version}),
@@ -24,7 +24,7 @@ class PeernetPeer {
24
24
  this.connection = connection;
25
25
 
26
26
  this.connection.on('data', (message) => {
27
- this.bw.down += data.length;
27
+ this.bw.down += message.length;
28
28
  pubsub.publish('peernet.data', JSON.parse(message.toString()));
29
29
  });
30
30
  }
@@ -272,7 +272,7 @@ class LeofcoinStorage$1 {
272
272
 
273
273
  }
274
274
 
275
- var version = "0.9.12";
275
+ var version = "0.10.0";
276
276
 
277
277
  var api$1 = {
278
278
  version: ({send}) => send({client: '@peernet/api/http', version}),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leofcoin/peernet",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "description": "",
5
5
  "main": "dist/commonjs/peernet.js",
6
6
  "module": "dist/module/peernet.js",
package/src/peer.js CHANGED
@@ -9,7 +9,7 @@ export default class PeernetPeer {
9
9
  this.connection = connection
10
10
 
11
11
  this.connection.on('data', (message) => {
12
- this.bw.down += data.length
12
+ this.bw.down += message.length
13
13
  pubsub.publish('peernet.data', JSON.parse(message.toString()))
14
14
  })
15
15
  }