@interopio/browser-worker 3.5.0 → 4.1.0-beta.0

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.
@@ -18,7 +18,7 @@
18
18
  OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
19
19
  PERFORMANCE OF THIS SOFTWARE.
20
20
  ***************************************************************************** */
21
- /* global Reflect, Promise, SuppressedError, Symbol */
21
+ /* global Reflect, Promise, SuppressedError, Symbol, Iterator */
22
22
 
23
23
 
24
24
  function __awaiter(thisArg, _arguments, P, generator) {
@@ -32,8 +32,8 @@
32
32
  }
33
33
 
34
34
  function __generator(thisArg, body) {
35
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
36
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
37
  function verb(n) { return function (v) { return step([n, v]); }; }
38
38
  function step(op) {
39
39
  if (f) throw new TypeError("Generator is already executing.");
@@ -874,11 +874,12 @@
874
874
  }))
875
875
  });
876
876
 
877
+ /* @ts-self-types="./index.d.ts" */
877
878
  let urlAlphabet =
878
879
  'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
879
880
  let nanoid = (size = 21) => {
880
881
  let id = '';
881
- let i = size;
882
+ let i = size | 0;
882
883
  while (i--) {
883
884
  id += urlAlphabet[(Math.random() * 64) | 0];
884
885
  }
@@ -1267,7 +1268,7 @@
1267
1268
  }
1268
1269
  };
1269
1270
  channel.addEventListener("message", openHandler);
1270
- self.clients.openWindow(url)["catch"](reject);
1271
+ self.clients.openWindow(url).catch(reject);
1271
1272
  setTimeout(function () { return reject("Timed out waiting for the platform to open and send a ready signal: ".concat(platformOpenTimeoutMS, " MS")); }, platformOpenTimeoutMS);
1272
1273
  });
1273
1274
  };
@@ -1361,7 +1362,8 @@
1361
1362
  vibrate: event.notification.vibrate
1362
1363
  };
1363
1364
  channel.postMessage({ messageType: messageType, action: action, glueData: glueData, definition: definition });
1364
- })["catch"](function (error) {
1365
+ })
1366
+ .catch(function (error) {
1365
1367
  var stringError = typeof error === "string" ? error : JSON.stringify(error.message);
1366
1368
  channel.postMessage({ messageType: "notificationError", error: stringError });
1367
1369
  });
@@ -1396,7 +1398,8 @@
1396
1398
  vibrate: event.notification.vibrate
1397
1399
  };
1398
1400
  channel.postMessage({ messageType: messageType, action: action, glueData: glueData, definition: definition });
1399
- })["catch"](function (error) {
1401
+ })
1402
+ .catch(function (error) {
1400
1403
  var stringError = typeof error === "string" ? error : JSON.stringify(error.message);
1401
1404
  channel.postMessage({ messageType: "notificationError", error: stringError });
1402
1405
  });