promise-worker-bi 5.0.0 → 5.0.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.
package/README.md CHANGED
@@ -8,7 +8,7 @@ This is based on [promise-worker](https://github.com/nolanlawson/promise-worker)
8
8
 
9
9
  Install:
10
10
 
11
- yarn add promise-worker-bi
11
+ npm install promise-worker-bi
12
12
 
13
13
  Inside your main bundle:
14
14
 
package/dist/index.js CHANGED
@@ -238,8 +238,10 @@ class PWBHost extends PWBBase {
238
238
  if (!common) {
239
239
  return;
240
240
  }
241
- const message = common.message,
242
- type = common.type;
241
+ const {
242
+ message,
243
+ type
244
+ } = common;
243
245
  if (type === MSGTYPE_HOST_ID) {
244
246
  if (message[2] !== undefined && typeof message[2] !== "number") {
245
247
  throw new Error("Invalid hostID");
@@ -358,8 +360,10 @@ class PWBWorker extends PWBBase {
358
360
  if (!common) {
359
361
  return;
360
362
  }
361
- const message = common.message,
362
- type = common.type;
363
+ const {
364
+ message,
365
+ type
366
+ } = common;
363
367
  if (type === MSGTYPE_HOST_CLOSE) {
364
368
  if (typeof message[2] !== "number") {
365
369
  throw new Error("Invalid hostID");