@hylid/env 6.4.1 → 6.5.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.
@@ -44,4 +44,7 @@ export var webChecker = [{
44
44
  }, {
45
45
  name: CLIENT.KASPI,
46
46
  match: [NO_MINIPROGRAM, NO_GRIVER, /Kaspi/]
47
+ }, {
48
+ name: CLIENT.BLUECODE,
49
+ match: [NO_MINIPROGRAM, NO_GRIVER, /Bluecode/]
47
50
  }];
@@ -31,6 +31,7 @@ export declare const CLIENT: {
31
31
  WORLDFIRST: string;
32
32
  SCB_PLANETPLUS: string;
33
33
  ZALOPAY: string;
34
+ BLUECODE: string;
34
35
  HUAWEI_ATOMIC: string;
35
36
  };
36
37
  export declare const HAVE_MINIPROGRAM: RegExp;
package/lib/constants.js CHANGED
@@ -32,6 +32,7 @@ export var CLIENT = {
32
32
  WORLDFIRST: 'worldfirst',
33
33
  SCB_PLANETPLUS: 'scb_planetplus',
34
34
  ZALOPAY: 'zalopay',
35
+ BLUECODE: 'bluecode',
35
36
  HUAWEI_ATOMIC: 'huawei_atomic'
36
37
  };
37
38
  export var HAVE_MINIPROGRAM = /miniprogram/i;
package/lib/index.d.ts CHANGED
@@ -9,6 +9,10 @@ interface CustomEnv {
9
9
  client?: string;
10
10
  platform?: string;
11
11
  }
12
+ /**
13
+ * 判断是否是已接入的H5钱包
14
+ */
15
+ export declare function isH5Wallet(): boolean;
12
16
  export declare function customEnv(config: CustomEnv | ((env: CustomEnv) => CustomEnv)): void;
13
17
  declare const clientEnv: ClientEnv;
14
18
  declare const platformEnv: PlatformEnv;
package/lib/index.js CHANGED
@@ -36,6 +36,12 @@ export function getDefaultDiscernEnv() {
36
36
  var _a = getDefaultDiscernEnv(),
37
37
  client = _a.client,
38
38
  platform = _a.platform;
39
+ /**
40
+ * 判断是否是已接入的H5钱包
41
+ */
42
+ export function isH5Wallet() {
43
+ return platform === PLATFORM.WEB && client !== CLIENT.H5;
44
+ }
39
45
  export function customEnv(config) {
40
46
  var custom = typeof config === 'function' ? config({
41
47
  client: client,
package/lib/version.js CHANGED
@@ -1 +1 @@
1
- export default '6.4.1';
1
+ export default '6.5.1';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hylid/env",
3
- "version": "6.4.1",
3
+ "version": "6.5.1",
4
4
  "main": "lib/index.js",
5
5
  "files": [
6
6
  "lib"