@keplr-wallet/common 0.12.102-rc.0 → 0.12.102

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/build/index.d.ts CHANGED
@@ -9,3 +9,4 @@ export * from "./retry";
9
9
  export * from "./sleep";
10
10
  export * from "./mnemonic";
11
11
  export * from "./coin";
12
+ export * from "./service-worker";
package/build/index.js CHANGED
@@ -25,4 +25,5 @@ __exportStar(require("./retry"), exports);
25
25
  __exportStar(require("./sleep"), exports);
26
26
  __exportStar(require("./mnemonic"), exports);
27
27
  __exportStar(require("./coin"), exports);
28
+ __exportStar(require("./service-worker"), exports);
28
29
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B;AAC3B,0CAAwB;AACxB,yCAAuB;AACvB,0CAAwB;AACxB,2CAAyB;AACzB,yCAAuB;AACvB,yCAAuB;AACvB,0CAAwB;AACxB,0CAAwB;AACxB,6CAA2B;AAC3B,yCAAuB;AACvB,mDAAiC"}
@@ -0,0 +1 @@
1
+ export declare const isServiceWorker: () => boolean;
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.isServiceWorker = void 0;
4
+ const isServiceWorker = () => {
5
+ return (typeof self !== "undefined" &&
6
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
7
+ // @ts-ignore
8
+ typeof ServiceWorkerGlobalScope !== "undefined" &&
9
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
10
+ // @ts-ignore
11
+ self instanceof ServiceWorkerGlobalScope);
12
+ };
13
+ exports.isServiceWorker = isServiceWorker;
14
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/service-worker/index.ts"],"names":[],"mappings":";;;AAAO,MAAM,eAAe,GAAG,GAAY,EAAE;IAC3C,OAAO,CACL,OAAO,IAAI,KAAK,WAAW;QAC3B,6DAA6D;QAC7D,aAAa;QACb,OAAO,wBAAwB,KAAK,WAAW;QAC/C,6DAA6D;QAC7D,aAAa;QACb,IAAI,YAAY,wBAAwB,CACzC,CAAC;AACJ,CAAC,CAAC;AAVW,QAAA,eAAe,mBAU1B"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@keplr-wallet/common",
3
- "version": "0.12.102-rc.0",
3
+ "version": "0.12.102",
4
4
  "main": "build/index.js",
5
5
  "author": "chainapsis",
6
6
  "license": "Apache-2.0",
@@ -16,10 +16,10 @@
16
16
  "lint-fix": "eslint --fix \"src/**/*\" && prettier --write \"src/**/*\""
17
17
  },
18
18
  "dependencies": {
19
- "@keplr-wallet/crypto": "0.12.102-rc.0",
20
- "@keplr-wallet/types": "0.12.102-rc.0",
19
+ "@keplr-wallet/crypto": "0.12.102",
20
+ "@keplr-wallet/types": "0.12.102",
21
21
  "buffer": "^6.0.3",
22
22
  "delay": "^4.4.0"
23
23
  },
24
- "gitHead": "6522587493fc31eb1390bd0dd5aafd50de8330d0"
24
+ "gitHead": "da583632e7cbadebc3667d180b5a6d63bbdff539"
25
25
  }
package/src/index.ts CHANGED
@@ -9,3 +9,4 @@ export * from "./retry";
9
9
  export * from "./sleep";
10
10
  export * from "./mnemonic";
11
11
  export * from "./coin";
12
+ export * from "./service-worker";
@@ -0,0 +1,11 @@
1
+ export const isServiceWorker = (): boolean => {
2
+ return (
3
+ typeof self !== "undefined" &&
4
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
5
+ // @ts-ignore
6
+ typeof ServiceWorkerGlobalScope !== "undefined" &&
7
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
8
+ // @ts-ignore
9
+ self instanceof ServiceWorkerGlobalScope
10
+ );
11
+ };