bare-rpc 0.2.4 → 0.2.5

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.
Files changed (2) hide show
  1. package/index.js +3 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -10,7 +10,7 @@ const OutgoingStream = require('./lib/outgoing-stream')
10
10
  const CommandRouter = require('./lib/command-router')
11
11
 
12
12
  module.exports = exports = class RPC {
13
- constructor(stream, onrequest) {
13
+ constructor(stream, onrequest = noop) {
14
14
  this._stream = stream
15
15
 
16
16
  this._id = 0
@@ -404,3 +404,5 @@ module.exports = exports = class RPC {
404
404
  }
405
405
 
406
406
  exports.CommandRouter = CommandRouter
407
+
408
+ function noop() {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bare-rpc",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
4
4
  "description": "librpc ABI compatible RPC for Bare",
5
5
  "exports": {
6
6
  ".": {