@alipay/ams-checkout 0.0.1724309103-dev.1 → 0.0.1724942009-dev.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.
package/esm/util/index.js CHANGED
@@ -83,6 +83,11 @@ var EventCenter = /*#__PURE__*/function () {
83
83
  };
84
84
  this.on(name, onceF, key);
85
85
  }
86
+ }, {
87
+ key: "isExist",
88
+ value: function isExist(name) {
89
+ return this.events.has(name);
90
+ }
86
91
  }]);
87
92
  return EventCenter;
88
93
  }();
@@ -166,6 +171,10 @@ var isPC = function isPC() {
166
171
  return userAgentInfo.includes(agent);
167
172
  });
168
173
  };
174
+ var isWebView = function isWebView(mockUA) {
175
+ var ua = mockUA || navigator.userAgent;
176
+ return /webview|wv|ip((?!.*safari)|(?=.*like safari))/i.test(ua);
177
+ };
169
178
  var queryParse = function queryParse(url) {
170
179
  var qs = {};
171
180
  if (!url) {
@@ -327,4 +336,4 @@ function loadSDKScript(_ref, logger) {
327
336
  document.head.appendChild(script);
328
337
  });
329
338
  }
330
- export { getType, EventCenter, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript };
339
+ export { getType, EventCenter, getViewPort, getOrigin, serialize, isJsonString, isDom, isFunction, device, safeJson, isPC, isWebView, queryParse, getDesignFontSize, amsSetSize, addSetFontSizeEvent, getOrSetStorageId, checkTimeElapsed, parseBase64ToString, loadSDKScript };
@@ -0,0 +1,2 @@
1
+ export * from './isAndroid';
2
+ export * from './isIOS';
@@ -0,0 +1,2 @@
1
+ export * from "./isAndroid";
2
+ export * from "./isIOS";
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 当前运行环境是否 Android
3
+ */
4
+ export declare function isAndroid(mockUA?: string): boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 当前运行环境是否 Android
3
+ */
4
+ export function isAndroid(mockUA) {
5
+ var ua = (mockUA || navigator.userAgent).toLowerCase();
6
+ return /android|adr|linux/.test(ua);
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * 当前运行环境是否 IOS
3
+ */
4
+ export declare function isIOS(mockUA?: string): boolean;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * 当前运行环境是否 IOS
3
+ */
4
+ export function isIOS(mockUA) {
5
+ var ua = (mockUA || navigator.userAgent).toLowerCase();
6
+ return /iphone|ipad|ipod|ios|macintosh/.test(ua);
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@alipay/ams-checkout",
3
- "version": "0.0.1724309103-dev.1",
3
+ "version": "0.0.1724942009-dev.0",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "main": "esm/index.js",