universal-env
Advanced tools
Comparing version 1.0.5 to 1.0.6
@@ -12,8 +12,8 @@ "use strict"; | ||
exports.isWeex = isWeex; | ||
var isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined'; // In taobao mp'webview __sfc__ is an object | ||
var isReactNative = typeof __fbBatchedBridgeConfig !== 'undefined'; | ||
exports.isReactNative = isReactNative; | ||
var isMiniApp = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' || isTaoWebview; | ||
var isMiniApp = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' && !isTaoWebview; | ||
exports.isMiniApp = isMiniApp; | ||
var isWechatApp = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined'; | ||
var isWechatApp = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined'; // In taobao mp'webview __sfc__ is an object | ||
exports.isWechatApp = isWechatApp; | ||
@@ -20,0 +20,0 @@ var isWeb = isWebPure && !isMiniApp && !isWechatApp || isTaoWebview; |
{ | ||
"name": "universal-env", | ||
"author": "rax", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"license": "BSD-3-Clause", | ||
@@ -6,0 +6,0 @@ "main": "lib/index.js", |
@@ -13,6 +13,5 @@ // https://www.w3.org/TR/html5/webappapis.html#dom-navigator-appcodename | ||
export const isReactNative: boolean = typeof __fbBatchedBridgeConfig !== 'undefined'; | ||
export const isMiniApp: boolean = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' && !isTaoWebview; | ||
export const isWechatApp: boolean = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined'; | ||
// In taobao mp'webview __sfc__ is an object | ||
export const isMiniApp: boolean = typeof my === 'object' && typeof my.getSystemInfo !== 'undefined' || isTaoWebview; | ||
export const isWechatApp: boolean = typeof wx === 'object' && typeof wx.getSystemInfo !== 'undefined'; | ||
export const isWeb: boolean = isWebPure && !isMiniApp && !isWechatApp || isTaoWebview; | ||
@@ -19,0 +18,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
12235